Apache alias for Laravel and Lumen Apache alias for Laravel and Lumen laravel laravel

Apache alias for Laravel and Lumen


The message is telling you didn't added the option Indexes

<Directory /data/user/service/public>   Options +FollowSymlinks +Indexes   AllowOverride All</Directory>

Your alias probably will have to be

Alias /z /data/user/service/public

or

Alias /z/ /data/user/service/public/


Directory index forbidden by Options directive: /data/user/service/public

Apache has not found file specified by DirectoryIndex - default to index.php index.html and cannot show indexes follow you're configurationAre you sure there is one of this files present in /data/user/service/public ?

Be sure of this and add and .htaccess into you're public directory

Options +FollowSymLinksRewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^ index.php [L]

from http://lumen.laravel.com/docs/installation#pretty-urls

or add a directory block to parent level (if there is some symb link)

  <Directory /data/user>        Options -Indexes FollowSymLinks        AllowOverride all        Order Allow,Deny        Allow from all    </Directory>


Untested, but adding Require all granted should remove some of the sharing restrictions.

The other thing to consider is ensuring your folder is actually owned by Apache's owner (www-data, apache, or even your username or something else depending on your installation). If the folder can't be read by Apache, it will trigger an error.

I also switched the Directory to refer to the Alias rather than the file path.

 <VirtualHost *:80>  ServerName example.com  DocumentRoot /data/user/public_html/public  Alias /z /data/user/service/public  <Directory /z>   Options +FollowSymlinks +Indexes   AllowOverride All   Require all granted  </Directory>  <Directory /data/user/public_html/public>   Options +FollowSymlinks   AllowOverride All  </Directory> </VirtualHost>