-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance: rm acme-challenge if auto-renewal off #30
- Loading branch information
Showing
27 changed files
with
651 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":"1.7.9","build_id":87,"total_build":157} | ||
{"version":"1.7.9","build_id":88,"total_build":158} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":"1.7.9","build_id":87,"total_build":157} | ||
{"version":"1.7.9","build_id":88,"total_build":158} |
136 changes: 65 additions & 71 deletions
136
resources/development/nginx/sites-available/homework.jackyu.cn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,78 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
server_name homework.jackyu.cn; | ||
# rewrite ^(.*)$ https://$host$1 permanent; | ||
return 307 https://$server_name$request_uri; | ||
listen 80; | ||
listen [::]:80; | ||
server_name homework.jackyu.cn; | ||
# rewrite ^(.*)$ https://$host$1 permanent; | ||
return 307 https://$server_name$request_uri; | ||
location /.well-known/acme-challenge { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real_IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $remote_addr:$remote_port; | ||
proxy_pass http://127.0.0.1:5002; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl http2; | ||
listen [::]:443 ssl http2; | ||
|
||
server_name homework.jackyu.cn; | ||
|
||
ssl_certificate /etc/nginx/ssl/jackyu.cn/alpha/jackyu.cn_server_cert.pem; | ||
ssl_certificate_key /etc/nginx/ssl/jackyu.cn/alpha/jackyu.cn_key.pem; | ||
|
||
root /var/www/homework/frontend; | ||
|
||
# Add index.php to the list if you are using PHP | ||
index index.html; | ||
|
||
location / { | ||
# First attempt to serve request as file, then | ||
# as directory, then fall back to displaying a 404. | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
listen 443 ssl http2; | ||
listen [::]:443 ssl http2; | ||
server_name homework.jackyu.cn; | ||
ssl_certificate /etc/nginx/ssl/homework.jackyu.cn/fullchain.cer; | ||
ssl_certificate_key /etc/nginx/ssl/homework.jackyu.cn/private.key; | ||
root /var/www/homework/frontend; | ||
# Add index.php to the list if you are using PHP | ||
index index.html; | ||
location / { | ||
# First attempt to serve request as file, then | ||
# as directory, then fall back to displaying a 404. | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
location /student { | ||
index manage.html; | ||
try_files $uri $uri/ /student.html; | ||
} | ||
|
||
index manage.html; | ||
try_files $uri $uri/ /student.html; | ||
} | ||
location /teacher { | ||
index manage.html; | ||
try_files $uri $uri/ /teacher.html; | ||
} | ||
|
||
index manage.html; | ||
try_files $uri $uri/ /teacher.html; | ||
} | ||
location /admin { | ||
index admin.html; | ||
try_files $uri $uri/ /admin.html; | ||
} | ||
|
||
index admin.html; | ||
try_files $uri $uri/ /admin.html; | ||
} | ||
location ^~/upload/ { | ||
alias /var/www/homework/api/upload/; | ||
} | ||
include error_json; | ||
location /api/ { | ||
proxy_http_version 1.1; | ||
alias /var/www/homework/api/upload/; | ||
} | ||
location /api/ { | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection upgrade; | ||
|
||
proxy_pass http://127.0.0.1:9008/; | ||
proxy_redirect off; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://127.0.0.1:9008/; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
client_max_body_size 1000m; | ||
} | ||
|
||
location /zigbee-pi { | ||
alias /var/www/zigbee-pi/frontend/; | ||
index index.html; | ||
} | ||
|
||
location /zigbee-pi/api/ { | ||
proxy_http_version 1.1; | ||
} | ||
location /zigbee-pi { | ||
alias /var/www/zigbee-pi/frontend/; | ||
index index.html; | ||
} | ||
location /zigbee-pi/api/ { | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection upgrade; | ||
|
||
proxy_pass http://127.0.0.1:9200/; | ||
proxy_redirect off; | ||
|
||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://127.0.0.1:9200/; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
client_max_body_size 1000m; | ||
} | ||
} | ||
} | ||
location /.well-known/acme-challenge { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real_IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $remote_addr:$remote_port; | ||
proxy_pass http://127.0.0.1:5002; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
server_name qi.jackyu.cn; | ||
rewrite ^(.*)$ https://$host$1 permanent; | ||
|
||
listen 80; | ||
listen [::]:80; | ||
server_name qi.jackyu.cn amstourship.jackyu.cn; | ||
rewrite ^(.*)$ https://$host$1 permanent; | ||
location /.well-known/acme-challenge { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real_IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $remote_addr:$remote_port; | ||
proxy_pass http://127.0.0.1:5002; | ||
} | ||
} | ||
|
||
server { | ||
server_name qi.jackyu.cn; | ||
ssl_certificate /etc/nginx/ssl/jackyu.cn/alpha/jackyu.cn_server_cert.pem; | ||
ssl_certificate_key /etc/nginx/ssl/jackyu.cn/alpha/jackyu.cn_key.pem; | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:5001/; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
|
||
} | ||
|
||
server_name qi.jackyu.cn amstourship.jackyu.cn; | ||
ssl_certificate /etc/nginx/ssl/qi.jackyu.cn_amstourship.jackyu.cn/fullchain.cer; | ||
ssl_certificate_key /etc/nginx/ssl/qi.jackyu.cn_amstourship.jackyu.cn/private.key; | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
location / { | ||
proxy_pass http://127.0.0.1:5001/; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
location /.well-known/acme-challenge { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real_IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $remote_addr:$remote_port; | ||
proxy_pass http://127.0.0.1:5002; | ||
} | ||
} |
Oops, something went wrong.