You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
667 B
Plaintext
38 lines
667 B
Plaintext
8 years ago
|
server {
|
||
|
listen 80 default_server;
|
||
|
listen [::]:80 default_server ipv6only=on;
|
||
|
server_name localhost;
|
||
|
|
||
|
charset UTF-8;
|
||
|
|
||
|
index index.html index.htm;
|
||
|
root /srv/http/vnstat;
|
||
|
|
||
|
location / {
|
||
|
try_files $uri $uri/ =404;
|
||
|
autoindex on;
|
||
|
}
|
||
|
|
||
|
# redirect server error pages to the static page /50x.html
|
||
|
#
|
||
|
error_page 500 502 503 504 /50x.html;
|
||
|
location = /50x.html {
|
||
|
root /usr/share/nginx/html;
|
||
|
}
|
||
|
|
||
|
location /nginx_status {
|
||
|
stub_status on;
|
||
|
access_log off;
|
||
|
allow 127.0.0.1;
|
||
|
allow ::1;
|
||
|
deny all;
|
||
|
}
|
||
|
|
||
|
|
||
|
location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf|svg)$ {
|
||
|
expires 30d;
|
||
|
# Optional: Don't log access to assets
|
||
|
access_log off;
|
||
|
}
|
||
|
}
|