我希望你能帮我解决我的问题。
我在专用服务器上运行ngninx作为反向代理。我的WordPress应用程序位于另一个VM上,它以Websever的形式运行apache2。在我在WordPress中使用“permalinks”之前,一切都很好。我收到:
“在此服务器上找不到请求的URL/联系我们/地址。”
这是我在nginx上的配置:
server {
listen 443;
ssl on;
server_name foo.com;
access_log /var/log/nginx/foo.access.log;
error_log /var/log/nginx/foo.error.log;
ssl_certificate /etc/nginx/ssl-certificates/foo.de.crt;
ssl_certificate_key /etc/nginx/ssl-certificates/foo.de.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers RC4:HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
keepalive_timeout 60;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
location / {
proxy_pass https://111.111.111.111;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name foo.com;
add_header Strict-Transport-Security max-age=2592000;
rewrite ^/.*$ https://$host$request_uri? permanent;
}
我不知道为什么我不能使用permalinks。有人面临同样的问题吗?
提前感谢!