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

Trouble setting up SSL in nginx

$
0
0
I cannot get nginx to run with my SSL server section, otherwise it works fine.

I have nginx running in a Windows-based VM.
I've forwarded both ports to this VM.

Below is my config... what do I have wrong?

#user nobody;
worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;

keepalive_timeout 65;

server {
listen 81;
server_name localhost 192.168.1.199;

location / {
root html;
index index.html index.htm;
}

location /sonarr {
proxy_pass http://127.0.0.1:8989/sonarr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
}

location /radarr {
proxy_pass http://127.0.0.1:7878/radarr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
}

location /qbt/ {
proxy_pass http://127.0.0.1:8080/qbit;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
http2_push_preload on; # Enable http2 push
}

location /sab/ {
proxy_pass http://localhost:8085/sabnzbd/;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

}

#HTTPS server

server {
listen 91;
ssl on;
server_name mydomain.com;

ssl_certificate "C:/certs/45649670_mydomain.com.cert";
ssl_certificate_key "C:/certs/45649670_mydomain.com.key";

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;

ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

location / {
root /var/www/;
root /home/www/public_html/mydomain.com/public/;
index index.html index.htm;
}
}
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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