public-health-ch/docs/public-health.conf

58 lines
1.4 KiB
Text
Raw Normal View History

2017-04-06 07:42:47 +00:00
# Public Health CMS stage
upstream wagtail-stage {
server localhost:5000;
}
server {
listen 80;
server_name ph-alpha.nebula1.public-health.ch;
client_max_body_size 64M;
gzip on;
gzip_types text/plain text/css application/x-javascript image/svg+xml;
gzip_comp_level 1;
gzip_disable msie6;
gzip_http_version 1.0;
gzip_proxied any;
gzip_vary on;
location /static/ {
access_log off;
expires 3600;
alias /opt/public-health-ch/static/;
}
# Set a longer expiry for CACHE/, because the filenames are unique.
location /static/CACHE/ {
access_log off;
expires 864000;
alias /opt/public-health-ch/static/CACHE/;
}
# Only server /media/images by default, not e.g. original_images/.
location /media/images {
expires 864000;
alias /opt/public-health-ch/media/images;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://wagtail-stage;
}
}
server {
listen 80; listen 443 ssl;
server_name conference.public-health.ch;
location /fr {
return 301 $scheme://sph17.organizers-congress.org/frontend/index.php?sub=89;
}
location / {
return 301 $scheme://sph17.organizers-congress.org;
}
}