esteban
esteban

Reputation: 308

Nginx 504 timeout initial wordpress installation

I am trying to access a WordPress installation with an IP Address. I get a 504 timeout error. However, I added an info.php page and I get the page served to me by requesting it at xx.xx.xx.xx/info.php.

The logs give me this error:

upstream timed out (110: Connection timed out) while reading response header from upstream

My sites-enabled file is:

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;
    }

}

This is installation is basically an AMI of working site but using a name based url so I can't understand why it doesnt work. Is there something special I have to do to use an IP Address as server_name?

Upvotes: 0

Views: 471

Answers (2)

esteban
esteban

Reputation: 308

It turned out that my AWS Security Group settings were not aligned correctly. So if anyone has this problem, check your Sec Group settings :)

Upvotes: 0

Hakem
Hakem

Reputation: 334

My opinion would be to disable all plugins by renaming the plugins folder.

Also you can add these lines to your wp-config.php temporarily.

define('WP_HOME','http://xx.xx.xx.xx');

define('WP_SITEURL','xx.xx.xx.xx');

However from my experience some plugins or themes are written in a way, that you would actually need to do a search and replace on the database.

Checking the php fpm error logs might give more details.

Upvotes: 1

Related Questions