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.

Problem maybe rewrite engine or apache configuration

Hi,

I have an application on an Ubuntu 14.04 server that I migrate on an Ubuntu 18.04 server. It's a totaly new instance. I copied the contain of my site.conf file et set up phalcon. Everythings look fine except when I try to access the application. Blank page.

I revise every setting and I'm incapable of accessing the application. Nothing in the error log. Excep when I access the index.php directly in the url like: [root]/public/index.php from there I'm getting:

The requested URL /admin/session was not found on this server. mod_rewrite is enabled in apache

I'm running out of idea. Any help please ?

Apache config file:

<VirtualHost *:80>

        ServerAdmin [myEmail]

        DocumentRoot "/var/www/html/admin/public"

        DirectoryIndex index.php
        ServerName [myServerName]
        ServerAlias [myAlias.myServerName

        <Directory "/var/www/html/admin/public">
                Options All
                AllowOverride All
                allow from all
        </Directory>

</VirtualHost>

Here my .htaccess:

<IfModule mod_rewrite.c>

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

my 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]
</IfModule>


27.4k
Accepted
answer

OK I found the problem. It was related to the 000-default.conf that was not correctly configurated.