Question

Installing Concrete5 on LEMP

Posted April 3, 2015 3.2k views
DigitalOceanLEMP

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
    

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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

Submit an Answer