You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

76 lines
1.9 KiB

server {
listen 80;
#listen [::]:80;
server_name api.yimian.xyz;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
# listen 80;
# listen [::]:80;
listen 443 ssl;
server_name api.yimian.xyz;
root /home/www/api;
index index.php index.html;
ssl_certificate /mnt/config/ssl/yimian.xyz/yimian.xyz.crt; #2
ssl_certificate_key /mnt/config/ssl/yimian.xyz/yimian.xyz.key; #3
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
# history reason redirect
location = /getImgNum.php {
add_header Access-Control-Allow-Origin *;
return 301 https://api.yimian.xyz/img/getImgNum.php;
}
# error_page 404 = /404.php;
# Load configuration files for the default server block.
include /mnt/etc/cn.yimian.xyz/nginx/default.d/*.conf;
location ^~ /coro/ {
proxy_pass http://coro-api:17676/;
}
location ^~ /todo-ddl/ {
proxy_pass http://todo-ddl-api:13233/;
}
location ^~ /upload/ {
proxy_pass http://upload-api:3000/;
#proxy_method POST;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
}
location ^~ /danmaku/ {
proxy_pass http://danmaku-api:1207/;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}