diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2025-06-06 23:27:30 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2025-06-06 23:27:30 +0800 |
commit | bdb0db706e579736137beb545f8588153e7eee31 (patch) | |
tree | 3b33b3e29fbf8d1b988001bac72ba476dd56d650 | |
parent | d225fa945d771048ba139ecaa8a8280026b67161 (diff) |
Update
-rw-r--r-- | nginx/sites-available/vps | 48 | ||||
-rw-r--r-- | smtpd/smtpd.conf | 6 |
2 files changed, 27 insertions, 27 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 { |
diff --git a/smtpd/smtpd.conf b/smtpd/smtpd.conf index 52c2b56..321aee6 100644 --- a/smtpd/smtpd.conf +++ b/smtpd/smtpd.conf | |||
@@ -8,9 +8,9 @@ | |||
8 | 8 | ||
9 | smtp max-message-size 3G | 9 | smtp max-message-size 3G |
10 | 10 | ||
11 | # Certificates from Let's Encrypt. | 11 | # Certificates from ACME.sh |
12 | pki mail.topo.tw cert "/etc/mail/ssl/fullchain.cer" | 12 | pki mail.topo.tw cert "/home/pham/.acme.sh/mail.topo.tw_ecc/mail.topo.tw.cer" |
13 | pki mail.topo.tw key "/etc/mail/ssl/mail.topo.tw.key" | 13 | pki mail.topo.tw key "/home/pham/.acme.sh/mail.topo.tw_ecc/mail.topo.tw.key" |
14 | 14 | ||
15 | # DKIM, command: | 15 | # DKIM, command: |
16 | # sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install --force git+https://github.com/palant/opensmtpd-filters.git | 16 | # sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install --force git+https://github.com/palant/opensmtpd-filters.git |