Skip to content

Instantly share code, notes, and snippets.

@dj1020
Last active September 18, 2020 04:47
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save dj1020/e9898200d82ad9a56c84e3cec644b44b to your computer and use it in GitHub Desktop.
Save dj1020/e9898200d82ad9a56c84e3cec644b44b to your computer and use it in GitHub Desktop.
Laravel Virtual Host for Apache Example
<VirtualHost *:80>
DocumentRoot "/Users/myName/Projects/laravel/public"
ServerName myLaravel.dev
<Directory "/Users/myName/Projects/laravel/public">
AllowOverride All
Options FollowSymLinks +Indexes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
@khandaniel
Copy link

You probably must add "+" sign before FollowSymLink option

@surferxo3
Copy link

I think you need the directory block if you are using .htaccess in the root else DocumentRoot is sufficient.

@kadnan
Copy link

kadnan commented Oct 20, 2019

I am getting error:

Sun Oct 20 11:54:31.644993 2019] [autoindex:error] [pid 6958] [client 39.48.215.121:49905] AH01276: Cannot serve directory /var/www/html/project/public/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment