by Devin Yang
(This article was automatically translated.)

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


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 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


Super easy to use HTML to PDF kit mpdf introduction

During development, will it be necessary to output HTML to PDF? This video introduces how to output PDF on the screen through the mpdf library of php.


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.


How to configure HTTPS on nginx to get an SSL A+ score from Qualys

This article describes how to adjust the ssl settings of nginx so that the website can obtain an SSL report and get an A+ rating. Here I am using letsencrypt free credentials. As long as you use the official Docker nginx new version image preset by D-Laravel, you should be able to achieve the same effect as mine. You can check your host SSL settings through the following.