Support the ongoing development of Laravel.io →
Configuration

Hello,

When I have this config file :

<VirtualHost *:80>
  
 DocumentRoot /var/www/laravel/public
 <Directory /var/www/laravel/pubilc>
         Options Indexes FollowSymLinks MultiViews
         AllowOverride None
         Order allow,deny
         allow from all
 </Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
     AllowOverride None
     Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
     Order allow,deny
     Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

but when I goto localhost I see this output :

 */ /* |-------------------------------------------------------------------------- | Register The Auto Loader      |-------------------------------------------------------------------------- | | Composer provides a convenient, automatically generated class loader | for our application. We just need to utilize it! We'll require it | into the script here so that we do not have to worry about the | loading of any our classes "manually". Feels great to relax. | */ require __DIR__.'/../bootstrap/autoload.php'; /* |-------------------------------------------------------------------------- | Turn On The Lights |-------------------------------------------------------------------------- | | We need to illuminate PHP development, so let's turn on the lights. | This bootstraps the framework and gets it ready for use, then it | will load up this application so that we can run it and send | the responses back to the browser and delight these users. | */ $app = require_once __DIR__.'/../bootstrap/start.php'; /* |-------------------------------------------------------------------------- | Run The Application |-------------------------------------------------------------------------- | | Once we have the application, we can simply call the run method, | which will execute the request and send the response back to | the client's browser allowing them to enjoy the creative | and wonderful application we have whipped up for them. | */ $app->run(); 

Roelof

Last updated 3 years ago.
0

You're seeing the output of public/index.php because Apache isn't parsing php files correctly. Make sure php5 is installed.

See: http://www.howtogeek.com/howto/ubuntu/installing-php5-and-apache-on-ubuntu/ if you're on ubuntu.

Last updated 3 years ago.
0

Thanks. I forget to install the apache php package on ubuntu

Last updated 3 years ago.
0

Thanks. I forget to install the apache php package on ubuntu

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.