diff options
Diffstat (limited to 'nginx/sites-available/vps')
-rw-r--r-- | nginx/sites-available/vps | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/nginx/sites-available/vps b/nginx/sites-available/vps index bb470c6..270eea7 100644 --- a/nginx/sites-available/vps +++ b/nginx/sites-available/vps | |||
@@ -1,3 +1,8 @@ | |||
1 | # charset | ||
2 | charset utf-8; | ||
3 | charset_types *; | ||
4 | override_charset on; | ||
5 | |||
1 | #map $token $api_client_name { | 6 | #map $token $api_client_name { |
2 | # default ""; | 7 | # default ""; |
3 | # | 8 | # |
@@ -15,21 +20,18 @@ map $uri $basename { | |||
15 | ~/(?<captured_basename>[^/]*)$ $captured_basename; | 20 | ~/(?<captured_basename>[^/]*)$ $captured_basename; |
16 | } | 21 | } |
17 | 22 | ||
18 | # charset | ||
19 | charset utf-8; | ||
20 | charset_types *; | ||
21 | override_charset on; | ||
22 | |||
23 | server { | 23 | server { |
24 | server_name topo.tw www.topo.tw; | 24 | server_name topo.tw; |
25 | 25 | ||
26 | listen 80; | 26 | listen 80; |
27 | listen 443 ssl; | 27 | listen 443 ssl; |
28 | ssl_certificate /home/pham/.acme.sh/topo.tw_ecc/fullchain.cer; | 28 | ssl_certificate /home/pham/.acme.sh/topo.tw_ecc/fullchain.cer; |
29 | ssl_certificate_key /home/pham/.acme.sh/topo.tw_ecc/topo.tw.key; | 29 | ssl_certificate_key /home/pham/.acme.sh/topo.tw_ecc/topo.tw.key; |
30 | location .well-known/ { | 30 | |
31 | root /home/pham/Downloads/.well-known; | 31 | # LOG |
32 | } | 32 | error_page 404 /404.html; |
33 | error_log /var/log/nginx/error.log debug; | ||
34 | #rewrite_log on; | ||
33 | 35 | ||
34 | # files | 36 | # files |
35 | root /srv/http; | 37 | root /srv/http; |
@@ -38,22 +40,20 @@ server { | |||
38 | #autoindex_exact_size off; | 40 | #autoindex_exact_size off; |
39 | disable_symlinks off; | 41 | disable_symlinks off; |
40 | 42 | ||
43 | # header | ||
44 | proxy_set_header Host $host; | ||
45 | add_header Cache-Control "no-cache" always; | ||
46 | #add_header Cache-Control "max-age=604800"; | ||
41 | 47 | ||
48 | # paths for temporary usage | ||
42 | include /etc/nginx/sites-available/topo.tw.tmp; | 49 | include /etc/nginx/sites-available/topo.tw.tmp; |
43 | 50 | ||
51 | # config for fancyindex | ||
44 | include /home/pham/site/nginx/modules/fancyindex/fancyindex.conf; | 52 | include /home/pham/site/nginx/modules/fancyindex/fancyindex.conf; |
45 | location ^~ /fancyindex/ { | 53 | location ^~ /fancyindex/ { |
46 | root /home/pham/site/nginx/modules; | 54 | root /home/pham/site/nginx/modules; |
47 | } | 55 | } |
48 | 56 | ||
49 | # header | ||
50 | proxy_set_header Host $host; | ||
51 | add_header Cache-Control "no-cache" always; | ||
52 | #add_header Cache-Control "max-age=604800"; | ||
53 | error_page 404 /404.html; | ||
54 | error_log /var/log/nginx/error.log debug; | ||
55 | #rewrite_log on; | ||
56 | |||
57 | try_files $uri $uri"index.html" $uri/index.html @rewrite_no_slash; | 57 | try_files $uri $uri"index.html" $uri/index.html @rewrite_no_slash; |
58 | 58 | ||
59 | location @rewrite_no_slash { | 59 | location @rewrite_no_slash { |
@@ -321,7 +321,7 @@ server { | |||
321 | ssl_certificate /home/pham/.acme.sh/rb.topo.tw_ecc/fullchain.cer; | 321 | ssl_certificate /home/pham/.acme.sh/rb.topo.tw_ecc/fullchain.cer; |
322 | ssl_certificate_key /home/pham/.acme.sh/rb.topo.tw_ecc/rb.topo.tw.key; | 322 | ssl_certificate_key /home/pham/.acme.sh/rb.topo.tw_ecc/rb.topo.tw.key; |
323 | 323 | ||
324 | root /srv/riverbien; | 324 | root /srv/river; |
325 | 325 | ||
326 | include /home/pham/site/nginx/modules/fancyindex/fancyindex.conf; | 326 | include /home/pham/site/nginx/modules/fancyindex/fancyindex.conf; |
327 | fancyindex_default_sort date_desc; | 327 | fancyindex_default_sort date_desc; |
@@ -331,6 +331,7 @@ server { | |||
331 | fancyindex_ignore dist plugin .*png .*jpg ^\..*; | 331 | fancyindex_ignore dist plugin .*png .*jpg ^\..*; |
332 | 332 | ||
333 | add_header Cache-Control "no-cache" always; | 333 | add_header Cache-Control "no-cache" always; |
334 | add_header Access-Control-Allow-Origin * always; | ||
334 | } | 335 | } |
335 | 336 | ||
336 | # git server | 337 | # git server |
@@ -409,7 +410,6 @@ server { | |||
409 | add_header Access-Control-Allow-Origin * always; | 410 | add_header Access-Control-Allow-Origin * always; |
410 | 411 | ||
411 | location / { | 412 | location / { |
412 | charset utf-8; | ||
413 | autoindex on; | 413 | autoindex on; |
414 | autoindex_localtime on; | 414 | autoindex_localtime on; |
415 | autoindex_exact_size off; | 415 | autoindex_exact_size off; |
@@ -431,11 +431,11 @@ server { | |||
431 | } | 431 | } |
432 | 432 | ||
433 | # FOR ACME.SH | 433 | # FOR ACME.SH |
434 | #server { | 434 | server { |
435 | # server_name rb.topo.tw; | 435 | server_name topo.tw www.topo.tw; |
436 | # root /home/pham/Downloads; | 436 | root /home/pham/Downloads; |
437 | # listen 80; | 437 | listen 80; |
438 | #} | 438 | } |
439 | 439 | ||
440 | # TODO, WORKING | 440 | # TODO, WORKING |
441 | #server { | 441 | #server { |