server { listen 80; listen 443 ssl; http2 on; server_name 1111149tuku.cc suejj.icu 89388.eu.cc; index index.php index.html index.htm default.php default.htm default.html; root /www/wwwroot/1111149tuku.cc/hou/public; #CERT-APPLY-CHECK--START include /www/server/panel/vhost/nginx/well-known/1111149tuku.cc.conf; #CERT-APPLY-CHECK--END include /www/server/panel/vhost/nginx/extension/1111149tuku.cc/*.conf; #SSL-START SSL相关配置 #error_page 404/404.html; #HTTP_TO_HTTPS_START set $isRedcert 1; if ($server_port != 443) { set $isRedcert 2; } if ( $uri ~ /\.well-known/ ) { set $isRedcert 1; } if ($isRedcert != 1) { rewrite ^(/.*)$ https://$host$1 permanent; } #HTTP_TO_HTTPS_END ssl_certificate /www/server/panel/vhost/cert/1111149tuku.cc/fullchain.pem; ssl_certificate_key /www/server/panel/vhost/cert/1111149tuku.cc/privkey.pem; ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; ssl_prefer_server_ciphers on; ssl_session_tickets on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; add_header Strict-Transport-Security "max-age=31536000"; error_page 497 https://$host$request_uri; #SSL-END #ERROR-PAGE-START 错误页配置,可以注释、删除或修改 #error_page 404 /404.html; #error_page 502 /502.html; #ERROR-PAGE-END #PHP-INFO-START PHP引用配置,可以注释或修改 include enable-php-74.conf; #PHP-INFO-END location = / { rewrite ^ /h5/ permanent; } location /static/ { alias /www/wwwroot/1111149tuku.cc/hou/public/h5/static/; } location /h5/ { try_files $uri $uri/ /h5/index.html; } location ~ ^/(runtime|application)/ { return 403; } location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md) { return 404; } location ~ \.well-known{ allow all; } if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) { return 403; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; error_log /dev/null; access_log /dev/null; } location ~ .*\.(js|css)?$ { expires 12h; error_log /dev/null; access_log /dev/null; } access_log /www/wwwlogs/1111149tuku.cc.log; error_log /www/wwwlogs/1111149tuku.cc.error.log; }