Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Rewrite and redirect a URL

$
0
0
Sorry for the newbie question, but I am struggling trying to rewrite and redirect a URL.

The external URL is www.mydomain:443/app1. The internal URL is 192.168.1.2:8080. Nginx is running on 192.168.1.1. I have tried several things looking at the docs and the forum. I believe I need 1 command to rewite the URL and then a second to redirect. I tried the code below, but it is not working.

location /app1{
rewrite ^/app1(.*) https://192.168.1.1$1 permanent;
proxy_pass https://192.168.1.2:8080;

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>