master
usa.yimian.xyz 3 years ago
parent 2513b151d7
commit b466226204
  1. 23
      usa.yimian.xyz/nginx/conf.d/img.yimian.xyz.conf

@ -1,19 +1,17 @@
server {
listen 80;
#listen [::]:80;
listen [::]:80;
server_name img.yimian.xyz;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
# listen 80;
# listen [::]:80;
#listen 80;
#listen [::]:80;
listen 443 ssl;
server_name img.yimian.xyz;
root /home/www/img/;
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
@ -23,16 +21,17 @@ server {
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;
# error_page 404 = /404.php;
if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; }
if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; }
if (!-f $request_filename){ rewrite (.*) /index.php; }
if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; }
# Load configuration files for the default server block.
include /mnt/etc/common/nginx/default.d/*.conf;
location / {
proxy_pass http://ushio-img:80;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Loading…
Cancel
Save