標籤: 訪問不了新建的站點
正在查看 5 個帖子:1-5 (共 5 個帖子)
-
作者帖子
-
為什麼再百度 nignx 下配置的 wordpress 多站點模式下。。。訪問不了子站點的首頁和儀表盤
沒明白也沒看到你這段話是啥意思,請詳細描述問題和你的操作方式。
多打幾個字花不了你多少時間。
新建的子站點。。都是打不開的。。
我的按照偽靜態配置
我猜是偽靜態的問題導致出現訪問不了
我要是修改成
server { listen 80; server_name smartbpm.cn *.smartbpm.cn index index.html index.htm index.php; root /home/bae/app; location ~ [^/]\.php(/|$) { #fastcgi_pass remote_php_ip:9000; fastcgi_pass unix:/dev/shm/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; } location / { index index.php; try_files $uri $uri/ /index.php?$args; } # Add trailing slash to */wp-admin requests. rewrite /wp-admin$ $scheme://$host$uri/ permanent; # Directives to send expires headers and turn off 404 error logging. location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires 24h; log_not_found off; } # this prevents hidden files (beginning with a period) from being served location ~ /\. { access_log off; log_not_found off; deny all; } # Pass uploaded files to wp-includes/ms-files.php. rewrite /files/$ /index.php last; if ($uri !~ wp-content/plugins) { rewrite /files/(.+)$ /wp-includes/ms-files.php?file=$1 last; } # Rewrite multisite '.../wp-.*' and '.../*.php'. if (!-e $request_filename) { rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last; rewrite ^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$ $1 last; rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last; } }
這個的話就會一直出現
那就是你偽靜態有問題,
server_name smartbpm.cn *.smartbpm.cn
你這是泛解析的,沒有寫子目錄的。這個試一下。
rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last; if (!-e $request_filename){ rewrite ^.+?(/wp-.*) $1 last; rewrite ^.+?(/.*\.php)$ $1 last; rewrite ^ /index.php last; }
謝謝了,處理好了。
百度雲單用户偽靜態處理用這個,在 bcloud_nginx_user.conf
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; }
多用户的 bcloud_nginx_user.conf 用下面的
用
rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last; if (!-e $request_filename){ rewrite ^.+?(/wp-.*) $1 last; rewrite ^.+?(/.*\.php)$ $1 last; rewrite ^ /index.php last; }
-
作者帖子
正在查看 5 個帖子:1-5 (共 5 個帖子)
- 哎呀,回覆話題必需登錄。