mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-12-23 23:23:06 +11:00
SSL server config
This commit is contained in:
parent
4bbab1b324
commit
668c2d71f4
2 changed files with 42 additions and 27 deletions
|
@ -4,32 +4,26 @@ upstream app_server {
|
|||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80 ipv6only=on;
|
||||
|
||||
server_name dpaste.de dpaste.org;
|
||||
|
||||
error_log /srv/dpaste.de/var/nginx.error.log;
|
||||
|
||||
keepalive_timeout 5;
|
||||
client_max_body_size 4G;
|
||||
|
||||
location /media/ {
|
||||
alias /srv/dpaste.de/var/media/;
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
alias /srv/dpaste.de/var/static/;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
proxy_pass http://app_server;
|
||||
break;
|
||||
}
|
||||
}
|
||||
include /srv/dpaste.de/src/dpaste/server/nginx_server.conf;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
server_name dpaste.de;
|
||||
ssl on;
|
||||
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
||||
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
||||
|
||||
include /srv/dpaste.de/src/dpaste/server/nginx_server.conf;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443;
|
||||
server_name dpaste.org;
|
||||
ssl on;
|
||||
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
||||
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
||||
|
||||
include /srv/dpaste.de/src/dpaste/server/nginx_server.conf;
|
||||
}
|
||||
|
|
21
server/nginx_server.conf
Normal file
21
server/nginx_server.conf
Normal file
|
@ -0,0 +1,21 @@
|
|||
server_name dpaste.de dpaste.org;
|
||||
|
||||
error_log /srv/dpaste.de/var/nginx.error.log;
|
||||
keepalive_timeout 5;
|
||||
client_max_body_size 4G;
|
||||
location /media/ {
|
||||
alias /srv/dpaste.de/var/media/;
|
||||
}
|
||||
location /static/ {
|
||||
alias /srv/dpaste.de/var/static/;
|
||||
}
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
if (!-f $request_filename) {
|
||||
proxy_pass http://app_server;
|
||||
break;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue