[英]Multiple uri indented on domain using nginx to access apache wordpress domain on localserver
我正在嘗試運行ZB6EFD6D118D0F6206E31419FF04CCZ和Z1870A829D9BC69BC69ABF500241FEZAF00241FEZ使用Zee434023CF89DFB21F63D63D64F07D77D77D74F07D74F07D74F07D74F07D74F07D74F07D74F07D7D74F07D74F07D7D7D7D7D7D7D7D7D7D7D7D74F07D74F074F07D7D74F074F074F07D7D74F074F074F64F07D74F074F07D9D74F074F。 通常我可以訪問 wp-admin 頁面,但是當我嘗試查看某個頁面時,頁面域帶有多個 uri,例如 localhost/wordpress/index.php/contact?q=wordpress/index.php/contato/&q=wordpress /index.php/contato/&q=wordpress/index.php/contato/&... 並且遠遠重復這一點。
我正在嘗試在本地運行 nginx 服務器,該服務器支持 apache 上的 wordpress 因為我想將此配置傳遞給我的 vps 以在 nodejs 中創建另一個網站而無需
這是我的 /etc/nginx/sites-enable/default 代碼:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
#try_files $uri $uri/ =404;
#try_files $uri $uri/ /index.php?q=$uri&$args;
try_files $uri $uri/ /index.php?$args;
proxy_pass http://localhost:81;
#proxy_pass_reverse / http://localhost:81/
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 X-Forwarded-Proto $scheme;
#ProxyPreserveHost On;
#rewrite /wp-admin$ $scheme://$host$uri/index.php?q=$1 permanent;
#rewrite ^/(.*)$ $scheme://$host$uri/index.php?q=$1 permanent;
rewrite ^/(.*)$ /index.php?$1 ;
include /etc/nginx/proxy_params;
}
location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ {
expires 30d;
}
location @proxy {
proxy_pass http://127.0.0.1:81;
include /etc/nginx/proxy_params;
}
location ~* \.php$ {
proxy_pass http://127.0.0.1:81;
#fastcgi_pass unix:/run/php/php7.0-fpm.sock;
#include snippets/fastcgi-php.conf;
include /etc/nginx/proxy_params;
}
}
我期待修復這個多個域。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.