When I config httpd-vhosts.conf like this and create a file index.php, I can access to index.php by http://lara.local OK
<VirtualHost lara.local:80>
ServerAdmin webmaster@lara.local
DocumentRoot "/var/www/html/lara.local"
DirectoryIndex index.php
ServerName lara.local
ServerAlias www.lara.local
ErrorLog "/var/log/httpd/lara.local-error_log"
CustomLog "/var/log/httpd/lara.local-access_log" common
<Directory "/var/www/html/lara.local">
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
but when I move DocumentRoot to /var/www/html/lara.local/public then I get an error:
Forbidden
You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
I try to seach many hours but nothing help, please help me resolve this problem?
--update
I try access direct url http://localhost/lara.local/public/ I get the same error “access denied”
I run this restorecon -v -R /var/www/html/, its ok but "/var/www/html/lara.local/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
I run chmod -R 777 storage, I get No application encryption key has been specified. I cant see .env file in source code
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community