Hi everyone,
I encountered error "Mod-Rewrite is not enabled. Please enable rewrite module on your web server to continue" when I navigate to newly created Phalcon project. I tried to change nginx configuration file but it does not work. Please help me to fix this problem. Thanks.
My server settings: 1- Ubuntu 12.04, Nginx -PHP5-FPM, MySQL. 2- root folder /var/www/cuong/www. I installed and run WordPress, PHPMyAdmin successfully on sub folder. /var/www/cuong/www -----------------------------/wordpress <- run ok -----------------------------/phpmyadmin <- run ok -----------------------------/store <- Phacon project generated by Dev-Tools. Error "Mod-Rewrite is not enabled...."
Below is detail of my Nginx configuration file:
erver { listen 80; ## listen for ipv4; this line is default and implied
root /var/www/cuong/www;
index index.php index.html index.htm;
server_name falcon;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
#fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}