最近把 VPS 上的 Apache 换成了 Nginx 。 VPS 上有两个网站,其中一个是 Ghost+Nginx 反代,没有任何问题。还有一个 WordPress ,假设域名是 www.example.com ,访问的时候一直都会跳转到 www.example.com/mail ,然后返回 404.如果建一个 mail 目录。把网站放进去,就可以正常访问。但是就是搞不懂为什么会跳转到 /mail 。
这是我的配置文件:
server {
listen 45.117.100.000:80;
listen 45.117.100.000:443 ssl;
server_name www.example.com;
ssl_certificate /path/to/cert.crt;
ssl_certificate_key /path/to/private.key;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:-ADH:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP;
root /var/www/html;
location / {
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite . /index.php last;
}
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}
还有,电脑上任何浏览器都访问正常,但是手机上访问 https 却提示无法建立安全的连接。