I created a drop in digitalocean, I can use vps_ip.
In my house, the way to connect to the Internet: route + modem + advertising.
I built wordpress on a local computer in my house.
The network status is shown below when you connect to the network.
WAN: MAC:ommitted for privacy IP :public_ip PPPoE subnet mask:255.255.255.255 gateway:153.0.68.1 DNS:114.114.114.114 223.5.5.5 LAN MAC:ommitted for privacy IP :192.168.1.1 subnet mask:255.255.255.0 DHCP:active ifconfig inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
My goal: to give the public access to my wordpress site on my home computer using vps_ip digitalocean.
Thanks CrypticDesigns.
https://www.digitalocean.com/community/questions/how-to-map-my-local-ip-192-168-1-100-with-my-vps_ip ?
I solved the problem using CrypticDesigns.
In my local network:
On my port 80, portorward port and private ip 192.168.1.100 to the outside of your network.
In a public drip system:
sudo apt-get install nginx sudo nano /etc/nginx/sites-available/default server { listen *:80; server_name vps_ip; rewrite .* http://publlic_ip$request_uri permanent; } sudo service nginx restart
Anyone posting to vpsip can now view my wordpress. It is important that my IP address on wan changes approximately every 30 minutes. After about 30 minutes?
The publication will change, the configuration file / etc / nginx / sites -available / default will not work.
I want to improve this problem.
My opinion is to make sure: 1. on my home computer
The curl ipinfo.io/ip command can get my public ip.
Write it to crontab every 30 minutes.
2.send vpsip and change the publicip value in / etc / nginx / sites -available / default
, and restart nginx.
How to express two steps with a shell command to make the process automatic?
source share