Vhost and Laravel

Vhost and Laravel

To be able to access the new project(blog) from the localhost by accessing http://blog.local  you must find and edit the file httpd-vhost.php (try Applications/AMPPS/apache/conf/extra/httpd-vhost.php):

ServerName blog.local
DocumentRoot “/Applications/AMPPS/www/blog/public”
<Directory “/Applications/AMPPS/www/blog/public”>
Allow From All
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [L]

If it doesn’t work

1. make sure that in httpd-conf.php to have this line not comment it:

# Include conf/extra/httpd-vhosts.conf

change it in:

Include conf/extra/httpd-vhosts.conf

2. also in terminal edit /etc/hosts from mac:

sudo nano /etc/hosts

there add the following line:       blog.local