Ad

Deploy Laravel 5 On Debian 7.5, Use Apache2 To Host

- 1 answer

I need help on deploy laravel 5 project on debian 7.5,i am not sure where is the problem. My host configuration like:

<VirtualHost *:80>

        ServerName stockhit.com

        ServerAdmin [email protected]

        DocumentRoot /var/www/stockhitsite/public

        ErrorLog ${APACHE_LOG_DIR}/stockhiterror.log
        CustomLog ${APACHE_LOG_DIR}/stockhitaccess.log combined
        <Directory /var/www/stockhitsite/public>
                DirectoryIndex index.php
                Options Indexes MultiViews FollowSymLinks
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>

When i access the site by url, the default laravel welcome page does not show, indeed, it shows the /public/index.php file's contents please help me out, i am trapped here by days,thanks in advance.

Ad

Answer

The problem is PHP is not enabled on your server. Open Apache config file (usually it's /etc/apache2/httpd.conf) and uncomment this or similar line:

#LoadModule php5_module libexec/apache2/libphp5.so
Ad
source: stackoverflow.com
Ad