Skip to content

Instantly share code, notes, and snippets.

@whelks-chance
Created January 8, 2018 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whelks-chance/b0f5044912f9ff78d0b3e36c23701404 to your computer and use it in GitHub Desktop.
Save whelks-chance/b0f5044912f9ff78d0b3e36c23701404 to your computer and use it in GitHub Desktop.
# 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/;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name dataportal 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 /var/www/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