Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
167 views
in Technique[技术] by (71.8m points)

javascript - Reverse proxy with nginx works everywhere but where I want it to work

I want my site to be available at mysite.io, with this code I tried to reverse proxy it so it works. After running this I found out it only works at mysite.io:5000, at my server's ip, and at my server's ip:5000. Basically all possibilities but the desired mysite.io, where did I go wrong? I appreciate any help, this is my first time deploying.

server {
        listen 80 default_server;
        listen [::]:80 default_server;
        root /var/www/html;

        
        index index.html index.htm index.nginx-debian.html;

        server_name mysite.io www.mysite.io;

        location / {
        proxy_pass http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        }

}
question from:https://stackoverflow.com/questions/65928508/reverse-proxy-with-nginx-works-everywhere-but-where-i-want-it-to-work

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...