1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/install/cowyo.nginx
Zack Scholl 25f005a688 updated nginx
Former-commit-id: 8921f18d2e79c11d8c1599a62d74001e2430f25e [formerly e9d12ed78e252b4d01279895510cb96863175bd1] [formerly 433ffaed97bcda9d707fef4d433efe47ba010dad [formerly 1901ee088fabba296750ed26e2eb1ad1d07d41a0 [formerly 25b373e1bb]]]
Former-commit-id: b18dee88c673f773f18fa38de3e6d1d970bee171 [formerly 9c5d887f433efda9f703c9f5eb12e42f2d1ee064]
Former-commit-id: 2c24834a9fb2ca4c303a7f65b416ddaaa44b256c
Former-commit-id: c4994b979d
2016-02-08 12:46:25 -05:00

42 lines
985 B
Nginx Configuration File

server {
# SERVER BLOCK FOR cowyo
listen 80; ## listen for ipv4; this line is default and implied
access_log /etc/nginx/logs/access-cowyo.log;
error_log /etc/nginx/logs/error-cowyo.log info;
root CUR_DIR;
server_name ADDRESS;
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
location ^~ /static {
try_files $uri $uri/ =404;
}
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_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:PORT;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}