There are several servers under the fixed IP of the public network (220.174.XX.XX). These servers are connected to the network through the router. One of the server IP (192.168.0.220) is used as the intranet WEB server and runs nginx. There are two websites on this server. The port mapping of these two websites is currently set up on the router like this:
The nginx running on this server listens to port 80, and the external port is 8888. Then through the settings in DNSPOD, you can access this through the domain name:
http://files.XXXX.com:8888/ page
Part of the configuration of files.xxxx.com.conf on nginx is as follows:
Now comes the problem, the configuration part of the second website web.xxxx.com.conf:
server{
listen 80;
server_name web.xxxx.com;
...
Routing port mapping configuration:
Then I also made similar A record parsing settings in DNSPOD, but I still cannot access http://web. xxxx.com:8080
How should I configure it?
The configuration seems to be fine, but I’m not sure what the reason is. However, since the domain names are different, you can also use port 8888 to access them. http://web.xxxx.com:8888. Also, I don’t know if you restarted Nginx after modifying the configuration.
There are many possibilities. First, make sure web.xxxx.com can be accessed via port 80 on the intranet.
In addition, although it is said to be a fixed IP on the public network, some operators may still block ports 80, 443, 8080 and other ports. Change to a high-end port and test it first.
Some routers may not work properly. Try to access the external network instead of accessing the external IP+ port from the internal network.