Common errors during Magento local environment setup and how to solve them quickly

The setup includes: Vagrant Ubuntu box + Nginx + MySql.

1 . Nginx 403 Forbidden

Nginx cannot find your index file. Make sure it exists in the project root directory.

2. Magento 404

Check your Nginx conf file. Search for fastcgi_param MAGE_RUN_CODE default; and try to comment it out.

3. 500 

Most probably Nginx config syntax error. Check /var/log/nginx/error.log. If not, check if you haven’t forgotten to specify your local setup URL in /etc/hosts on your machine.

4. Nginx 502

It is possible that Fpm PHP is wrongly configured. Check for ‘listen’ in /etc/php/php-fpm.conf. Copy this value to your nginx.conf file for fastcgi_pass parameter.

5. Cannot login to Magento admin. “Invalid form key. Please refresh the page”

Check web/cookie/cookie_domain and web/cookie/cookie_path values in core_config_data table in your database. The easiest way to do it is query select * from core_config_data where path like '%cookie%'; Check all of these values.

Usually on your local environment setup you can set both values to NULL. Alternatively, specify your domain name in web/cookie/cookie_domain Clear cache and browser cookies after you have made changes.

Like if it helped to let us know if that was useful for you.

Other errors during setup or something is not correct? Let’s discuss it in comments below or contact us!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s