my /etc/nginx/sites-available/default FILE ->
location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. proxy_redirect off; proxy_pass http://localhost:7000; 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; proxy_redirect off; }
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
@pravandanchand
From what you’ve posted, it looks like you’ve defined
proxy_redirect
twice, so I’d remove one.That said, in
/etc/nginx/nginx.conf
, make sureserver_name_in_redirect
is set tooff
if it’s defined. If it’s not defined, it defaults to off, so you don’t need to specifically add it.For your proxy configuration, I’d recommend using this:
So your location block would actually look like: