I am migrating from Apache to Nginx magento. The site works fine but when I try to access the admin generates a 404.
www.mydomain.com/admin
This is the configuration that I have on my server
server { listen 80; server_name www.mydomain.com; root /home/mydomain/public_html; index index.php index.html index.htm; keepalive_timeout 300; access_log logs/access.log; error_log logs/error.log; location / { if (!-e $request_filename) { rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last; } if ($uri ~* "\.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$") { expires max; break; } } location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { access_log off; log_not_found off; expires 30d; } location ~ .php/ { rewrite ^(.*.php)/ $1 last; } location ~ .php$ { if (!-e $request_filename) { rewrite / /index.php last; } expires off; fastcgi_pass unix:/tmp/php.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param MAGE_RUN_CODE default; fastcgi_param MAGE_RUN_TYPE store; include fastcgi_params; } location /nginx_status { stub_status on; access_log off; deny all; } location /RequestDenied { return 500; } if ($bad_method = 1) { return 444; } }
Versions
- Nginx/1.4.1
- Magento 1.8
- MySql 5.1.73