Welcome! Log In Create A New Profile

Advanced

Nginx config for the server as SSL proxy

Posted by mureev 
Nginx config for the server as SSL proxy
January 08, 2015 01:40AM
Hi!

I have several web interfaces, running on my Debian server (Deluge, BitTorrent Sync, Ajenti etc.) on different ports on localhost. To enable access from the web I setup nginx as a proxy and everything works fine for HTTP. And now I want to enable SSL to make secure access and faced with issue that my configs not working and error logs are empty.

My config template listed below. Could someone look into that?

server {
listen 80;
server_name {cp.domain.com};
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name {cp.domain.com};
client_max_body_size 20m;
access_log /var/log/nginx/{domain}.access.log;
error_log /var/log/nginx/{domain}.error.log;
ssl_certificate /etc/nginx/server.crt;
ssl_certificate_key /etc/nginx/server.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header Host $host;
proxy_redirect http://127.0.0.1:8000/ https://{cp.domain.com}/;
}
}
Re: Nginx config for the server as SSL proxy
January 14, 2015 03:03AM
Hi everyone,

I solve my issue. The reason was in my router - I forgot to forward 443 port...
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 205
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