Welcome! Log In Create A New Profile

Advanced

Reverse proxy and ssl

Posted by Havouza15 
Reverse proxy and ssl
February 13, 2024 04:50AM
Hi!
First post
Total newcomer to Nginx, has always used Apache.
But now I want to setup a VPS using Nginx.
The goal is to setup a domain and use it as reverse proxy for a server application that cant handle https.
The below conf works for http but how do I change it to force https?

Hope the q is understandable

server {
server_name <snip>

client_max_body_size 50000M;

location / {
proxy_pass http://<snip>:2283;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# http://nginx.org/en/docs/http/websocket.html
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
}
}

Regards
Anders Yuran
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 153
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready