Welcome! Log In Create A New Profile

Advanced

proxy_pass

Posted by jack.tai 
proxy_pass
September 27, 2022 12:01AM
hi All

Can somebody enlightened me why my proxy_pass directive are look like not working . when i added the syntax to nginx.conf
as below . i never can reach the server when open browser to http://www.example.com but i can access to http://www.example.com/web1only
base on the location /web1 directive.

I use many time for the troubleshooting and it failed . hope someone can give me guidance on this.

Note: i try use "proxy_pass http://www.myhealth.gov.my/ , it to proxy the request to internet resources but it failed as well.

I am attached the nginx.conf file at attached for your reference.

server {
listen 80;
server_name _;
# access_log logs/domain1.access.log main;
# root /usr/share/nginx/html;

location / {
proxy_pass http://127.0.0.1:8080/;
}
location /web1 {
root /usr/share/nginx;
}
}
}
Attachments:
open | download - nginx.conf (1.2 KB)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 275
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready