54 lines
917 B
Nginx Configuration File
54 lines
917 B
Nginx Configuration File
worker_processes auto;
|
|
error_log off;
|
|
user weewx;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
server_tokens off;
|
|
access_log off;
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
|
|
|
|
map $http_x_forwarded_proto $pass_scheme {
|
|
default $http_x_forwarded_proto;
|
|
'' $scheme;
|
|
}
|
|
|
|
map $http_x_forwarded_host $pass_host {
|
|
default $http_x_forwarded_host;
|
|
'' $host;
|
|
}
|
|
|
|
server {
|
|
listen 8000;
|
|
|
|
root /data/html;
|
|
index index.html;
|
|
|
|
location = / {
|
|
return 307 $pass_scheme://$pass_host/wdc;
|
|
}
|
|
|
|
location = /index.html {
|
|
return 307 $pass_scheme://$pass_host/wdc/index.html;
|
|
}
|
|
|
|
location ~* \.(html|json)$ {
|
|
expires modified 120s;
|
|
}
|
|
|
|
location ~* \.(js|css|png)$ {
|
|
expires 3d;
|
|
}
|
|
}
|
|
}
|