Level 75
Jan 26, 2021
4
Level 9
Apache Settings
Which is correct, or are both wrong?
ServerAdmin [email protected]
DocumentRoot /var/www/laravel/public
<Directory /var/www/laravel>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
-or-
ServerAdmin [email protected]
DocumentRoot /var/www/laravel/public
<Directory /var/www/laravel/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Level 25
The second one is the right one for two reasons:
- You need to have a
<Directory>block matching yourDocumentRootin order to configure it - You don't want to allow anything at
/var/www/laravelas there is where it lives your.envfile with all your sensitive credentials!
Hope this helps!
Please or to participate in this conversation.