This is my configuration (Debian):
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName laravel.local
DocumentRoot /var/www/laravel/public
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory /var/www/laravel/public>
#Options Indexes FollowSymLinks MultiViews
Options FollowSymlinks -MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/laravel-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/laravel-access.log combined
</VirtualHost>
only one localhost is possible ...
Each virtualhost, should have a servername directive.
If you are accessing your laravel (rpm) install under localhost, you just need to add the alias for it.
Alias /rpm /home/user/development/rpm/public
<Directory "/home/user/development/rpm/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
As mentioned, you don't need a 2nd DocumentRoot/ServerName as you already have that host defined under VirtualHost *:80 being localhost. The Alias directive will allow to mask/symlink that folder as if it were under your localhost folder.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.