diff --git a/_env/nginx.conf b/_env/nginx.conf new file mode 100644 index 00000000..0ce41f06 --- /dev/null +++ b/_env/nginx.conf @@ -0,0 +1,78 @@ +server { + listen 80; + server_name v2rayfreenode.com; # 保持一致,老弟! + + if ($host = v2rayfreenode.com) { + return 301 https://$host$request_uri; + } + + return 404; +} + +server { + listen 443 ssl; + server_name v2rayfreenode.com; # 统一域名,别搞串了 + + # --- 统一 Buffer 调优 (s_buffer_config) --- + fastcgi_buffers 16 16k; + fastcgi_buffer_size 32k; + proxy_buffer_size 128k; + proxy_buffers 4 256k; + proxy_busy_buffers_size 256k; + + root /www/wwwroot/v2rayfreenode.com/public; + index index.php index.html; + + # SSL 配置 (这里没毛病,保持你的 Certbot 引用) + ssl_certificate /etc/letsencrypt/live/v2rayfreenode.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/v2rayfreenode.com/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + # 性能优化 (高标准三剑客) + sendfile on; + tcp_nopush on; + tcp_nodelay on; + + # Gzip 压缩 (你写的很专业,继续保持) + gzip on; + gzip_static on; + gzip_min_length 1k; + gzip_comp_level 6; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/xml+rss; + gzip_vary on; + + # --- 静态资源 (s_static_assets) --- + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ { + expires 365d; + access_log off; + log_not_found off; # 别让日志报错塞满磁盘 + add_header Cache-Control "public, no-transform"; # 强制不被运营商劫持修改 + add_header X-Is-This-My-Nginx "Yes-s-Hungarian" always; + + try_files $uri =404; + } + + # --- Laravel 路由 --- + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + # --- PHP 处理 (o_php_handler) --- + location ~ \.php$ { + try_files $uri =404; + + fastcgi_pass unix:/run/php/php8.5-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + + fastcgi_param DOCUMENT_ROOT $realpath_root; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_read_timeout 360s; + } + + # 安全:禁止访问敏感文件 + location ~ /\.(?!well-known).* { + deny all; + } +} diff --git a/resources/views/components/app-layout.blade.php b/resources/views/components/app-layout.blade.php index d530006b..374bc557 100755 --- a/resources/views/components/app-layout.blade.php +++ b/resources/views/components/app-layout.blade.php @@ -6,7 +6,7 @@ 'sKeywords' => config('app.keywords'), 'sSlug' => '', 'sOgType' => 'website', - 'sOgImg' => 'sites/'.config("app.site_code_short").'/siteimg.jpg', + 'sOgImg' => '/sites/'.config("app.site_code_short").'/siteimg.jpg', ]) @@ -32,10 +32,10 @@ {{-- 声明它是 PNG,并告诉浏览器它的实际尺寸 --}} - + {{-- 强行喂给苹果,虽然它推荐 180,但 166 总比没有强 --}} - + {{-- 暂时没错颜色切换 --}} diff --git a/resources/views/components/nav-bar.blade.php b/resources/views/components/nav-bar.blade.php index 6c65a9d1..225248c5 100755 --- a/resources/views/components/nav-bar.blade.php +++ b/resources/views/components/nav-bar.blade.php @@ -2,10 +2,10 @@