by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

foreword

This video introduces how we can assign Public Ip to a specific project on D-Laravel.
It can be used no matter it is the setting of the external production environment or the demo of your own project on the intranet.

In the video, although I used the external network IP of PPPoE dial-up to illustrate, we can also use the local network IP on our own computer if we change it.
In this way, colleagues can connect to our D-Laravel Project.

About PPPoE floating IP on MacOs

A small reminder, if you use the six floating IPs of Hi-Net light generation like me, the first dial-up PPP Internet IP in MacOS will not be pinged by itself.
In fact, this IP can still be connected outside. If the reader uses PPPoE to obtain the IP of the external network like me,
When your local MacOS cannot ping the external IP you obtained,
We can dial another external ppp IP to the D-Laravel project, which is a simple solution.

Of course, you can forward the packet going to the ppp0 ip address to the local machine 127.0.0.1 by setting a static route to fix this problem.
However, setting static routing requires instructions, so I won’t explain more, so it is recommended to directly dial a test IP for D-Laravel to use.
1, 2, and 3 in the picture below are ppp0, ppp1 (wan1) and ppp2 (wan2) respectively. In this video, I use the external IP of ppp1 and ppp2.

The order of the network interfaces is very important here, which will affect which external IP we use.

Why don't I use ngrok

ngrok can easily export our services to the outside world, which is very convenient. If you need to use it, please Google it yourself
But I myself don't like to install too many extra software, whether to use it or not, please judge by yourself.
Basically I think this company should be safe, because he wants to make money, and he is unlikely to bury anything or steal user information.

But please note that things on the Internet are not absolutely safe, some free antivirus software itself is a poison,
If you haven't heard it, you should know that, as with any software,
Don't use software you don't understand at will. If you use it, it means you believe in it.

Try to use big companies (Google, Microsoft, Apple, etc.) or software used by more people.
Even if it is a big factory, there will be loopholes. The more you know about the Internet, the more careful you should be.
Why does Apple's VPN abandon PPTP and retain L2TP?
Why Google's WebRTC has to force the use of HTTPS has their reasons.

The reason behind why D-Laravel uses bash to execute simplified docker-compose instructions is very simple.
It is hoped that anyone can check how he works when needed, and no additional compilation is required during execution.

Of course, since I have the ssh key and the config of a large number of hosts on my personal computer, if I install software with problems or vulnerabilities today,
I don't want to see the key and configuration files being copied away. Although the important hosts I connect to need to go through VPN to SSH for remote management,
And it is also necessary to connect to the host through a specific IP, and a complex password is set in the SSH key.
But I still don't really want to install this software @@.

If you are using SSH and the key does not have a password set,
Please think about it, this is like an ATM card without a password, the person who picks it up can swipe it everywhere,
If your ssh config contains the location of the server, you still have root authority on this host, how terrible it is.
Therefore, some companies that attach great importance to information security do not allow employees to install software at will.

Back to the topic, this video is mainly for friends who are not familiar with nginx settings,
How to use the simple nginx sample configuration file provided on D-Laravel,
Let the Project on D-Laravel be used directly externally.

There are other ways to export internal services to the outside,
For example, through the virtual server of the sharer or our own external host,
It can also be displayed through SSH port forwarding, which is also OK. The above is my personal opinion.
If you don't know how to use SSH port forwarding, you can refer to my other video, which will be covered.
In ten minutes, the Laravel framework handles the LineBot idiom dictionary.
 

D-Laravel external network IP setting, actual operation video:

Tags: dlaravel

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


dlaravel

How to automatically detect and update the certificate issued by let's encrypt through getssl

It's really great that let's encrypt provides free certificates. However, is it a bit troublesome to update the certificate every three months? This article introduces how to generate multi-domain SAN certificate settings through getssl, and schedule automatic certificate renewal. It's very simple, just six steps to get it done.

dlaravel

How to start supervisor on D-Laravel

Since queue workers are a long-running program, we need a program manager supervisor to monitor whether the process on the Linux system is running continuously. For example, when the queue:work operation fails, the queue:work process can be automatically restarted. Fortunately, D-Laravel has a built-in supervisor, so you don't need to install it yourself to use it. This article briefly introduces how we start the supervisor in the container.

dlaravel

Use docker in docker to build a D-Laravel test environment.

D-Laravel is an extremely easy-to-use and extremely flexible Laravel development environment. As long as you are a Mac user, even if you don’t know Docker, you can use it to create Laravel projects and develop them. Due to the newly added .env function When it comes to functions, those who are in a hurry push, but there is no complete test, and a bunch of new bugs are created. Therefore, this time, a new dlaravel_test, a bash testing tool, is added to run the test through docker in docker. Make sure that every release of D-Laravel can be a stable version.