119 lines
3.7 KiB
Text
119 lines
3.7 KiB
Text
#user www-data;
|
|
#worker_processes 4;
|
|
pid /tmp/nginx.pid;
|
|
error_log /tmp/error-foo;
|
|
|
|
#events {
|
|
# worker_connections 768;
|
|
#}
|
|
|
|
http {
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 20;
|
|
types_hash_max_size 2048;
|
|
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
|
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
|
|
ssl_dhparam dhparams.pem;
|
|
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_session_cache shared:SSL:20m;
|
|
ssl_session_timeout 180m;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
access_log /tmp/access-main;
|
|
error_log /tmp/error-main;
|
|
|
|
##
|
|
# Gzip Settings
|
|
##
|
|
|
|
gzip on;
|
|
|
|
##
|
|
# Phusion Passenger config
|
|
##
|
|
# Uncomment it if you installed passenger or passenger-enterprise
|
|
##
|
|
|
|
#passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
|
|
#passenger_ruby /home/debshots/.rbenv/versions/2.3.1/bin/ruby;
|
|
|
|
|
|
server {
|
|
listen *:8000 default_server;
|
|
listen *:8443 ssl;
|
|
ssl_certificate screenshots.debian.net.crt;
|
|
ssl_certificate_key screenshots.debian.net.key;
|
|
ssl_client_certificate debsso.crt;
|
|
ssl_crl debsso.crl;
|
|
ssl_verify_client optional;
|
|
ssl_verify_depth 1;
|
|
|
|
root ../public;
|
|
server_name _;
|
|
access_log /tmp/access-front;
|
|
error_log /tmp/error-front;
|
|
|
|
# Tell the backend if the protocol used was HTTPS. Otherwise you get an infinite
|
|
# redirection loop because the backend assumes that HTTP was spoken behind the
|
|
# proxy.
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# Pass on the actual HTTP_HOST ("Host:" header) so that Rails can build proper absolute URLs
|
|
proxy_set_header Host $host;
|
|
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
gzip_proxied any;
|
|
|
|
location / {
|
|
try_files /maintenance.html @backend;
|
|
add_header X-Coffee main;
|
|
}
|
|
|
|
location /json/ {
|
|
try_files /maintenance.html @backend;
|
|
add_header X-Coffee json;
|
|
}
|
|
|
|
location /favicon.ico {
|
|
# try_files /maintenance.html @backend;
|
|
alias ../public/favicon.ico;
|
|
}
|
|
|
|
location @backend {
|
|
proxy_set_header x_debian_sso_dn $ssl_client_s_dn;
|
|
proxy_pass http://127.0.0.1:3000;
|
|
}
|
|
|
|
#location /assets/ {
|
|
# alias ../public/assets/;
|
|
# expires 1h;
|
|
# add_header X-Coffee assets;
|
|
#}
|
|
location /logo/ {
|
|
alias ../public/logo/;
|
|
expires 1h;
|
|
add_header X-Coffee logo;
|
|
}
|
|
location /screenshots/ {
|
|
alias ../public/screenshots/;
|
|
expires max;
|
|
add_header X-Coffee screenshots;
|
|
}
|
|
location /images/ {
|
|
alias ../public/images/;
|
|
expires 1h;
|
|
add_header X-Coffee images;
|
|
}
|
|
}
|
|
}
|
|
|