How to install Magento on Nginx

  • Posted September 6, 2014

Hi, Does someone know where to find a good tutorial how to install magento on Ubuntu 14.04 with LEMP?

My problem is that whatever I do I get a 404 when I try to install magento.

  1. I unpack magento to my www directory. 2. Give it correct permissions (755 for directories and 644 for files). 3. Hit my IP adress in the browser. 4. Gives me a 404.

I tried to create other files and place them in the same directory as magento install.php and they work just fine… for instance the info.php file with information about PHP works just fine. I follow this guide, but it’s from 2012, maybe it’s not up to date?

its really easy to install Magento on Apache, why so complicated on nginx? Maybe I’m just missing out something obvious here…


magento uses files called .htaccess these are hidden files placed in site root directory, that tell apache how to work with this very site nginx however doesn’t suppost these files, so you need to tell him how to work with magento all by yourself it requires some manual changes in nginx configuration files for instance the 404 error is triggered because nginx doesn’t know how to handle /index.php/install like adresses although the config files placement differs between linuxes (so the paths are not exactly correct for ubuntu), there is an article on nginx configuration in magento’s wiki -

I have the same question.

FYI, I’ve already googled this question… for 2 days! The answer is not out there… All tutorials on how to configure nginx to work properly with magento is for someone who knows what the code does, what files to look for etc etc. I just cant ride my bike on one wheel before I learn how to walk… ;)

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi Follow the instruction given in the below link:

I too had the same issue and got fixed it. Hope this helps.

Regards, Dinesh Arumugam

Can you post your nginx domain configuration please?