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


nginx,dlaravel

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. https://www.ssllabs.com/ssltest/index.html

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

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.