Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

new installation, mod rewrite not working

This is on an amazon EC2 instance. I go to the main directory URL and I see "mod rewrite is not enabled. Please enable rewrite module on your web server to continue."

[email protected]:/var/www/html$ uname -a
Linux ip-172-31-50-31 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I used phalcon-devtools to create a new project:

[email protected]:/var/www/html/KnowledgeBaseWeb$ find .

Here is ./htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule  ^$ public/    [L]
    RewriteRule  ((?s).*) public/$1 [L]

And here is ./public/.htaccess:

AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]

When I sudo a2enmod rewrite it says "module rewrite is already enabled."

Using php5.5.9-1ubuntu4.13 and apache 2.4.7-1ubuntu4.6 amd64. Phpinfo() reports phalcon 2.0.8



show us the apache config

check for

AllowOverride All



sudo nano /etc/apache2/apache2.conf

and changed

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted


<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted

And it worked! Thanks!