Installing Concrete5 on LEMP

April 3, 2015 1.2k views
LEMP DigitalOcean

Hi, I've created an instance with a LEMP stack. That all appears to work - I can open a phpinfo in browser and it shows me all ok.

However, if I then add concrete5 to my web root and go to http://mywebroot it just redirects to http://mywebroot/index.php/install with a 404 error.

I'm guessing there must be something wrong somewhere with the path that is expected?

Anyone set up c5 on a LEMP droplet - I'd imagine I'm missing something very simple and obvious.

1 comment
  • You will likely need to modify your nginx configuration to use the following as your Location / section:

            location / {
                    # try_files $uri $uri/ =404;
                    try_files $uri $uri/ /index.php?q=$uri&$args;
            }
    

    This serves much the same purpose as an .htaccess file does on Apache by redirecting requests to index.php.

    Once this is done, be sure to restart nginx for the changes to take effect.

    service nginx restart
    
1 Answer

This question was answered by @ryanpq:

You will likely need to modify your nginx configuration to use the following as your Location / section:

       location / {
               # try_files $uri $uri/ =404;
               try_files $uri $uri/ /index.php?q=$uri&$args;
       }

This serves much the same purpose as an .htaccess file does on Apache by redirecting requests to index.php.

Once this is done, be sure to restart nginx for the changes to take effect.

service nginx restart

View the original comment

Have another answer? Share your knowledge.