]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/dmca/templates/default/apache.erb
dmca: Deny access to .git directory
[chef.git] / cookbooks / dmca / templates / default / apache.erb
index 672a1be3e7d9903d7cce88779e9935c54d446e91..d59bb7e228a30a9d16c8896352c05213fd8ebafc 100644 (file)
   CustomLog /var/log/apache2/<%= @name %>-access.log combined
   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
-  DocumentRoot <%= @directory %>/html
+  DocumentRoot <%= @directory %>
 
   Options -Indexes
 </VirtualHost>
 
-<Directory <%= @directory %>/html>
+<Directory <%= @directory %>>
   Require all granted
 
   <FilesMatch ".+\.ph(ar|p|tml)$">
-    SetHandler "proxy:unix:/run/php/<%= @name %>.sock|fcgi://127.0.0.1"
+    SetHandler "proxy:unix:/run/php/php-<%= @name %>-fpm.sock|fcgi://127.0.0.1"
   </FilesMatch>
 </Directory>
+
+<Directory ~ "\.git">
+  Require all denied
+</Directory>