Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen 443 ssl;
- listen 443 quic reuseport;
- http2 on;
- http3 on;
- quic_gso on;
- quic_retry off;
- server_name catpdf.org www.catpdf.org;
- index index.php index.html index.htm default.php default.htm default.html;
- root /www/wwwroot/catpdf.org;
- # SSL 配置
- ssl_certificate /www/server/panel/vhost/cert/catpdf.org/fullchain.pem;
- ssl_certificate_key /www/server/panel/vhost/cert/catpdf.org/privkey.pem;
- ssl_protocols TLSv1.2 TLSv1.3;
- ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384';
- ssl_prefer_server_ciphers on;
- ssl_session_cache shared:SSL:10m;
- ssl_session_timeout 1h;
- ssl_early_data on;
- ssl_stapling on;
- ssl_stapling_verify on;
- # HTTP重定向至HTTPS
- if ($server_port !~ 443) {
- return 301 https://$host$request_uri;
- }
- # Proxy headers
- 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 Upgrade $http_upgrade;
- proxy_set_header Connection "Upgrade";
- proxy_buffering off;
- proxy_http_version 1.1;
- proxy_read_timeout 600s;
- # HTTP/3 headers
- add_header Alt-Svc 'h3=":443"; ma=2592000';
- add_header Strict-Transport-Security "max-age=15552000; includeSubDomains; preload";
- # Error pages
- error_page 497 https://$host$request_uri;
- # PHP 配置
- include enable-php-00.conf;
- # Rewrite rules
- include /www/server/panel/vhost/rewrite/catpdf.org.conf;
- # 禁止访问的文件或目录
- location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) {
- return 404;
- }
- # 一键申请SSL证书验证目录相关设置
- location ~ \.well-known {
- allow all;
- }
- # Static file handling
- location ~* \.(gif|jpg|jpeg|png|bmp|swf)$ {
- expires 30d;
- access_log off;
- }
- location ~* \.(js|css)?$ {
- expires 12h;
- access_log off;
- }
- # Logging
- access_log /www/wwwlogs/catpdf.org.log;
- error_log /www/wwwlogs/catpdf.org.error.log;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement