增加文件夹放html网页并自动生成到www.yaobai.org下
This commit is contained in:
@@ -1 +0,0 @@
|
||||
/etc/nginx/sites-available/ftp.140103.xyz
|
||||
@@ -0,0 +1,65 @@
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name ftp.140103.xyz;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/ftp.140103.xyz/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/ftp.140103.xyz/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
# 主界面 / API
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:11001;
|
||||
|
||||
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_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
|
||||
add_header Access-Control-Allow-Origin "*" always;
|
||||
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
|
||||
add_header Access-Control-Allow-Headers "Authorization, Content-Type" always;
|
||||
|
||||
if ($request_method = OPTIONS) {
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
|
||||
# 大文件上传接口
|
||||
location /seafhttp {
|
||||
rewrite ^/seafhttp(.*)$ $1 break;
|
||||
proxy_pass http://127.0.0.1:11002;
|
||||
|
||||
client_max_body_size 0;
|
||||
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_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
proxy_read_timeout 3600s;
|
||||
|
||||
proxy_hide_header Access-Control-Allow-Origin;
|
||||
proxy_hide_header Access-Control-Allow-Methods;
|
||||
proxy_hide_header Access-Control-Allow-Headers;
|
||||
|
||||
add_header Access-Control-Allow-Origin "https://upload.140103.xyz" always;
|
||||
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
|
||||
add_header Access-Control-Allow-Headers "Authorization, Content-Type" always;
|
||||
|
||||
if ($request_method = OPTIONS) {
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name ftp.140103.xyz;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
@@ -5,6 +5,14 @@ server {
|
||||
ssl_certificate_key /etc/letsencrypt/live/www.yaobai.org/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
|
||||
location /tutorials {
|
||||
alias /var/www/html/tutorials;
|
||||
index index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
|
||||
location /aisearch {
|
||||
proxy_pass http://127.0.0.1:8766/search;
|
||||
proxy_set_header Host $host;
|
||||
@@ -12,7 +20,6 @@ server {
|
||||
proxy_send_timeout 120s;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:11006;
|
||||
@@ -22,19 +29,3 @@ server {
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name ybih.140103.xyz;
|
||||
ssl_certificate /etc/letsencrypt/live/ybih.140103.xyz/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/ybih.140103.xyz/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
return 301 https://www.yaobai.org$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name www.yaobai.org ybih.140103.xyz;
|
||||
return 301 https://www.yaobai.org$request_uri;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user