Archived
1
0
Fork 0
This repository has been archived on 2024-07-01. You can view files and clone it, but cannot push or open issues or pull requests.
weewx-docker/defaults/nginx.conf

56 lines
919 B
Nginx Configuration File
Raw Normal View History

2022-07-27 14:28:39 +00:00
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;
2022-07-27 15:10:30 +00:00
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;
}
2022-07-27 14:28:39 +00:00
server {
listen 8000;
2022-07-29 19:51:29 +00:00
root /data/html/wdc;
2022-07-27 14:28:39 +00:00
index index.html;
2022-07-27 18:46:11 +00:00
location ~* \.html$ {
2022-07-27 14:28:39 +00:00
expires modified 120s;
}
2022-12-22 21:57:53 +00:00
location ~* \.(js|css)$ {
2023-02-10 23:22:46 +00:00
expires 1h;
2022-12-22 21:57:53 +00:00
}
2022-12-22 23:06:31 +00:00
location ~ ^/dwd/(icons|warn_icons)/ {
root /home/weewx/public_html;
2023-02-10 23:22:46 +00:00
expires 7d;
}
location ~ ^/dwd/[\w]+\.(gif|png) {
expires modified 1h;
2022-12-22 21:57:53 +00:00
}
2022-07-27 14:28:39 +00:00
}
}