寶塔的話直接在網站的偽靜態一欄中如下就行 location /admin { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 l ...
寶塔的話直接在網站的偽靜態一欄中如下就行 location /admin { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 l ...
1. 解決方式: 在 location 模塊添加一行配置: try_files $uri $uri/ /index.html; 如下: location / { index index.html; root /opt ...
最近跟着某機構的教學視頻敲了一遍vue項目,但是在windows環境下部署的時候就懵逼了放到nginx下正常跑沒問題,但是刷新之后就報404錯誤 前端項目構建vue 腳手架版本 是@vue/cli 4.3.1,構建項目之后沒有config.js文件。無奈按照網上說的最簡單 ...
在寶塔面板站點中增加相應配置: ...
server { listen 80 default_server; listen [::]:80 default_server; server_name localhsot; client_max_body_size 10M; root /usr/share/nginx ...
以寶塔面板為例: 找到寶塔面板域名的nginx配置文件進行編輯增加以下內容 fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param ...
location /{ try_files $uri $uri/ /index.html last; } ...
方案一 (這種方式容易被第三方劫持) location / { root /data/nginx/html; index index.html index.htm; error_page 404 /index.html; } 方案 ...