Excuse me, my nginx can only run on non-80 ports
So how do I forward the domain name to this non-80 port
For example, as follows:
listen 8000;
server_name abc.test www.abc.test;
location / {
root /home/www/abc.test;
index index.html index.htm;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
if ($http_host = "www.abc.test") {
proxy_pass http://127.0.0.1:8000;
}
if ($http_host = "abc.test") {
proxy_pass http://127.0.0.1:8000;
}
仅有的幸福2017-05-16 17:22:42
If your Nginx is listening on port 8000, then you need to find a way to forward port 80, similar to:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
大家讲道理2017-05-16 17:22:42
If there is no registration, just set up an off-wall server and then link to 8000 through nginx