Posted By: surajmore on November 28, 2022, 11:09 am | Post: 1 |
Hi,
You can not use location directly you will have to write the location under server section like example below: server { listen YOUR_SERVER_IP:80; server_name example.com http://www.example.com; # The Document Root root /home/username/public_html; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } |