0

I'm using Nginx to serve a webapp.

I need to reverse proxy all the URL's with the prefix ws

I tried the following Nginx configuration but it's not woking :

server { server_name example.com www.example.com; listen 80; listen [::]:80; return 301 https://www.example.com$request_uri; } server { listen 443 ssl; server_name example.com www.example.com; ssl_certificate /home/aspuser/ssl/example.crt; ssl_certificate_key /home/aspuser/ssl/example.key; access_log /var/log/nginx/reverse-access.log; error_log /var/log/nginx/reverse-error.log; location /ws { proxy_pass https://localhost:8443; } } 

I'm getting the error : HTTP ERROR 404, the page can’t be found.

I'm sure the underlying application is working because when in the config file, if I change the location to simply location / it works. However I need it for the pages with the prefix ws.

Can anyone help please ?

Thanks,

3
  • serverfault.com/questions/562756/… Commented Jan 30, 2021 at 7:06
  • Please add a couple of examples of the original URL and destination URL you would like to have. It is hard to see what "with the suffix" actually means. Commented Jan 30, 2021 at 9:02
  • Your configuration looks correct. Exactly what does this 404 error look like? Did you check your logs? Commented Jan 30, 2021 at 17:45

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.