Created
February 4, 2016 12:22
-
-
Save Leotomas/bfe0cbeeaf09f3e2fe01 to your computer and use it in GitHub Desktop.
Apache conf to protect private dir in /public for Laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ************************************ | |
# Vhost template in module puppetlabs-apache | |
# Managed by Puppet | |
# ************************************ | |
<VirtualHost *:80> | |
ServerName extranet.sefima.local | |
## Vhost docroot | |
DocumentRoot "/var/www/extranet.sefima.local/public" | |
## Directories, there should at least be a declaration for /var/www/extranet.sefima.local/public | |
<Directory "/var/www/extranet.sefima.local/public"> | |
Options Indexes FollowSymlinks MultiViews | |
AllowOverride All | |
Require all granted | |
<FilesMatch "\.php$"> | |
Require all granted | |
SetHandler proxy:fcgi://127.0.0.1:9000 | |
</FilesMatch> | |
<IfModule mod_php5.c> | |
php_admin_value blackfire.server_id "5fc34c5f-767d-4e99-996f-4a9858638c7d" | |
php_admin_value blackfire.server_token "3ac2260e038f138a5bca515b72c0205117d886777cf6472b14beabb704e06aa1" | |
</IfModule> | |
</Directory> | |
<Directory "/var/www/extranet.sefima.local/public/private> | |
Order allow,deny | |
Deny from all | |
RewriteRule ^(.*/) - [F,L] | |
</Directory> | |
## Logging | |
ErrorLog "/var/log/apache2/av_tck5sa7pc5ij_error.log" | |
ServerSignature Off | |
CustomLog "/var/log/apache2/av_tck5sa7pc5ij_access.log" combined | |
## Server aliases | |
ServerAlias www.extranet.sefima.local | |
## SetEnv/SetEnvIf for environment variables | |
SetEnv APP_ENV dev | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment