57 lines
1.4 KiB
Nginx Configuration File
57 lines
1.4 KiB
Nginx Configuration File
events {
|
|
worker_connections 768;
|
|
}
|
|
|
|
pid /tmp/nginx.pid;
|
|
error_log /tmp/error info;
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
ssl_dhparam dhparams.pem;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
access_log /tmp/access-main;
|
|
error_log /tmp/error-main info;
|
|
|
|
##
|
|
# Gzip Settings
|
|
##
|
|
|
|
gzip on;
|
|
|
|
server {
|
|
listen *:3001 ssl;
|
|
ssl_certificate localhost.crt;
|
|
ssl_certificate_key localhost.key;
|
|
ssl_client_certificate debsso.crt;
|
|
ssl_crl debsso.crl;
|
|
ssl_verify_client optional;
|
|
ssl_verify_depth 1;
|
|
proxy_set_header X-Debian-SSO-DN $ssl_client_s_dn;
|
|
|
|
root ../public;
|
|
server_name _;
|
|
access_log /tmp/access-front;
|
|
error_log /tmp/error-front info;
|
|
|
|
# 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:$server_port;
|
|
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
gzip_proxied any;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:3000/;
|
|
}
|
|
}
|
|
}
|