Created
January 9, 2018 00:42
-
-
Save whelks-chance/1a40062079f348f0e2c8e5f81f9c483d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For more information on configuration, see: | |
# * Official English Documentation: http://nginx.org/en/docs/ | |
# * Official Russian Documentation: http://nginx.org/ru/docs/ | |
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
access_log /var/log/nginx/access.log main; | |
client_max_body_size 10m; | |
client_header_buffer_size 32k; | |
large_client_header_buffers 4 32k; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
# Load modular configuration files from the /etc/nginx/conf.d directory. | |
# See http://nginx.org/en/docs/ngx_core_module.html#include | |
# for more information. | |
include /etc/nginx/conf.d/*.conf; | |
server { | |
# listen 443 default_server; | |
# root /var/www/html/.well-known/acme-challenge/; | |
listen 443 ssl http2; | |
server_name dataportal data.wiserd.ac.uk dataportal1-wiserd.cf.ac.uk; | |
ssl_certificate /etc/letsencrypt/live/dataportal1-wiserd.cf.ac.uk/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/dataportal1-wiserd.cf.ac.uk/privkey.pem; | |
# SSL Configuration Start | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
resolver 8.8.4.4 8.8.8.8 valid=300s; | |
resolver_timeout 10s; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 10m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers On; | |
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS; | |
# Closing SSL configuration | |
# Stuff required by certbot | |
location ~ /.well-known { | |
allow all; | |
} | |
location / { | |
include uwsgi_params; | |
uwsgi_pass unix:/home/spx5ich/wiserd3.5.0/wiserd3/wiserd3.sock; | |
} | |
} | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name dataportal data.wiserd.ac.uk dataportal1-wiserd.cf.ac.uk; | |
root /usr/share/nginx/html; | |
# Load configuration files for the default server block. | |
include /etc/nginx/default.d/*.conf; | |
location ^~ /.well-known/acme-challenge { | |
alias /usr/share/nginx/html/.well-known/acme-challenge/; | |
} | |
location / { | |
include uwsgi_params; | |
uwsgi_pass unix:/home/spx5ich/wiserd3.5.0/wiserd3/wiserd3.sock; | |
# proxy_set_header Host $http_host; | |
# proxy_pass http://127.0.0.1:8000; | |
# proxy_set_header X-Forwarded-Host $server_name; | |
# proxy_set_header X-Real-IP $remote_addr; | |
# add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"'; | |
} | |
# location / { | |
# include uwsgi_params; | |
# uwsgi_pass unix:/home/spx5ich/wiserd3.5.0/wiserd3/wiserd3.sock; | |
# } | |
location /static { | |
autoindex on; | |
alias /home/spx5ich/wiserd3.5.0/wiserd3/dataportal3/static/; | |
# alias /home/spx5ich/wiserd3/dataportal3/static/; | |
} | |
location /media { | |
alias /home/spx5ich/wiserd3.5.0/wiserd3/dataportal3/media/; | |
} | |
# location / { | |
# } | |
error_page 404 /404.html; | |
location = /40x.html { | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment