nginx 初始配置
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name www.yaobai.org;
|
||||
ssl_certificate /etc/letsencrypt/live/www.yaobai.org/fullchain.pem;
|
||||
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 /aisearch {
|
||||
proxy_pass http://127.0.0.1:8766/search;
|
||||
proxy_set_header Host $host;
|
||||
proxy_read_timeout 120s;
|
||||
proxy_send_timeout 120s;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
}
|
||||
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:11006;
|
||||
proxy_set_header Host $http_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 {
|
||||
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