Nginx 504 超时初始 wordpress 安装
Nginx 504 timeout initial wordpress installation
我正在尝试使用 IP 地址访问 WordPress 安装。我收到 504 超时错误。但是,我添加了一个 info.php 页面,我通过在 xx.xx.xx.xx/info.php.
请求它来获得为我服务的页面
日志给我这个错误:
upstream timed out (110: Connection timed out) while reading response header from upstream
我的站点启用文件是:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/test/wordpress;
index index.php index.html index.htm;
server_name xx.xx.xx.xx; #ip address here
location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
此安装基本上是工作站点的 AMI,但使用的是基于 url 的名称,所以我不明白为什么它不起作用。要将 IP 地址用作 server_name?
,我需要做些什么特别的事情吗?
我的意见是通过重命名插件文件夹来禁用所有插件。
您也可以临时将这些行添加到您的wp-config.php
。
define('WP_HOME','http://xx.xx.xx.xx');
define('WP_SITEURL','xx.xx.xx.xx');
但是根据我的经验,某些插件或主题的编写方式实际上需要在数据库中进行搜索和替换。
检查 php fpm 错误日志 可能会提供更多详细信息。
原来我的 AWS 安全组设置没有正确对齐。因此,如果有人遇到此问题,请检查您的安全组设置:)
我正在尝试使用 IP 地址访问 WordPress 安装。我收到 504 超时错误。但是,我添加了一个 info.php 页面,我通过在 xx.xx.xx.xx/info.php.
请求它来获得为我服务的页面日志给我这个错误:
upstream timed out (110: Connection timed out) while reading response header from upstream
我的站点启用文件是:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/test/wordpress;
index index.php index.html index.htm;
server_name xx.xx.xx.xx; #ip address here
location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
此安装基本上是工作站点的 AMI,但使用的是基于 url 的名称,所以我不明白为什么它不起作用。要将 IP 地址用作 server_name?
,我需要做些什么特别的事情吗?我的意见是通过重命名插件文件夹来禁用所有插件。
您也可以临时将这些行添加到您的wp-config.php
。
define('WP_HOME','http://xx.xx.xx.xx');
define('WP_SITEURL','xx.xx.xx.xx');
但是根据我的经验,某些插件或主题的编写方式实际上需要在数据库中进行搜索和替换。
检查 php fpm 错误日志 可能会提供更多详细信息。
原来我的 AWS 安全组设置没有正确对齐。因此,如果有人遇到此问题,请检查您的安全组设置:)