LEMP on Ubuntu 14.04 Connection Timeout

May 9, 2015 1k views

Any help would be appreciated. I've been at this for 2-3 days now (really only my second time setting up any kind of server). I did the one click install for LEMP with DigitalOcean. At some point I reinstalled nginx and reinstalled php, to fix issues I had made. Now I am at a point where everything works fine when I use only an index.html file in my /var/www/example.com/public_html directory. However, when I attempt to use my project files (built on PrestaShop), i go to my domain, it is redirected to, and eventually gets a connection time out with no further error code/log that I know of. Without getting too much into config specifics (since everything is loading when I only use a plain index.html) does anyone have any idea as to what could be causing this? Does it sound like a memory limit issue... if so how could I verify that? I also have a mysql database already set up.... but I would think if it was a mysql error I would get more of an error log. Will be happy to give any more info as needed

  • Hi. Have you configured Nginx to run PHP? I don't know PrestaShop, but it seems to be based on PHP. Have you compleded this tutorial - https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04.
    Default server block in Nginx does not execute PHP-based files, so you need change the configuration.

  • Thanks for the help. I had configured a server block for nginx to run PHP. I did notice one difference in my location ~ .php$ {} section from that tutorial (factcgisplitpath_info) which i tried changing but no luck. Basically I have tried what feels like everything as far as the server block. Also though, if my only file in by web root is index.php, everything still runs fine. So presumably php is working. There are also specific rewrite rules I have in there, that PrestaShop uses. I would get the file to paste here but I actually already shut the droplet down and am going to try apache. Still open to solution on nginx, but four days later I had to try something else.

    Anytime I access the domain, i get a 302 redirect to this ip No errors logged. In the access log i see the 302. It may or may not be helpful info that before moving to this server I was using Vagrant, and that IP is the same as my Vagrant IP was. So I dont know if perhaps somewhere in my project is declaring that IP.. but i've checked just about everywhere with no luck.

  • Alright, well.. redid everything from a LAMP stack with apache2. Came to the exact same issue :(, guess that means it's probably in my code somewhere. Or i'm missing something fundamental in setting up the server/domain.

2 Answers

I solved it. For anyone wondering, this is specifically related to PrestaShop. You MUST change PS SHOP DOMAIN and PS SSL SHOP DOMAIN (or something along those lines) in the config table in your database. I was looking everywhere in my code and nginx but didnt think to check the database.

Have another answer? Share your knowledge.