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

D-Laravel's sublime plug-in can be installed by Package Control.

Mac or Linux users can now install the D-Laravel alias package from Sublime3's package control. Through D-Laravel alias, we can execute artisan and composer commands in the container in an easier way. In the docker environment, do you want to use composer to install the package? You don’t need to enter the container, or set the ce alias of composer, and you can execute it directly in sublime.

dlaravel

D-laravel has added the recommended opcache.ini settings

The latest version of D-Laravel has added opcache's recommended settings. The enabling method is very simple, please execute it in the D-Laravel directory.

dlaravel

D-Laravel specific service restart

Normally, we use ./console restart to rebuild and execute contaiener. Sometimes, we have multiple services and don't want to restart all services at once, At this time, you can use ./console restart [servce name] to restart a specific service..