44 lines
No EOL
1.3 KiB
Text
44 lines
No EOL
1.3 KiB
Text
##
|
|
# You should look at the following URL's in order to grasp a solid understanding
|
|
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
|
# http://wiki.nginx.org/Pitfalls
|
|
# http://wiki.nginx.org/QuickStart
|
|
# http://wiki.nginx.org/Configuration
|
|
#
|
|
# Generally, you will want to move this file somewhere, and start with a clean
|
|
# file but keep this around for reference. Or just disable in sites-enabled.
|
|
#
|
|
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
|
##
|
|
|
|
# HTTP Server
|
|
server {
|
|
listen 80 default_server;
|
|
# listen [::]:80 default_server ipv6only=on;
|
|
root /srv/www;
|
|
|
|
# Make site accessible from http://localhost/
|
|
server_name localhost;
|
|
|
|
error_log stderr notice;
|
|
|
|
#location-start
|
|
location /whoami {
|
|
proxy_pass http://whoami;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
|
## Required for websockets
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_read_timeout 600s;
|
|
|
|
## Optional: Do not log, get it at the destination
|
|
access_log off;
|
|
}
|
|
#location-end
|
|
} |