mercredi 30 novembre 2016

Laravel shows entire php code as web page

I hosted laravel 5 on remote server and I did basic configuration and remove the Internal Server Error issue using virtual host. I have updated server' apache conf file by adding following rules.

<Directory "/var/www/server/data/www/http://ift.tt/2gN9r2u">
Allowoverride All
</Directory>

<Directory "/var/www/server/data/www/example.com/laravel">
Allowoverride All
</Directory>

After that it removes Internal Server Error issue. But now the index web page shows entire php code as a webpage. .htaccess file in public directory as follows.

AddHandler application/x-httpd-php56 .php .php5 .php4 .php3
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On
    #RewriteBase /

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

And storage directory have full 777 permission. Where is the problem?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2fGYqnz
via IFTTT

Aucun commentaire:

Enregistrer un commentaire