Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Apache 2.4 and PHP FPM support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Jul 14, 2014
1 parent 7910a39 commit ac535d2
Show file tree
Hide file tree
Showing 18 changed files with 186 additions and 68 deletions.
35 changes: 17 additions & 18 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<IfModule mod_rewrite.c>
# Zend rewrite rules
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

</IfModule>

# Security: no folder fetching
Options -Indexes

# Configuration PHP
php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag short_open_tag on
<IfModule deflate_module>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

<IfModule php_module>
php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag short_open_tag on
</IfModule>

<IfModule mod_deflate.c>
# Compress output
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
<IfModule rewrite_module>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
</IfModule>
11 changes: 9 additions & 2 deletions core/configs/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions core/constant/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions core/controllers/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions core/database/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions core/layouts/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions core/models/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
45 changes: 24 additions & 21 deletions core/public/.htaccess
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
<IfModule mod_expires.c>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
ExpiresActive On
ExpiresDefault "access plus 10 years"
</FilesMatch>
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

<IfModule expires_module>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
ExpiresActive On
ExpiresDefault "access plus 10 years"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1

<IfModule mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>

<IfModule !mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1
</IfModule>
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1

<IfModule expires_module>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>

<IfModule !expires_module>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1
</IfModule>
</IfModule>

<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
FileETag none
FileETag none
</FilesMatch>
8 changes: 6 additions & 2 deletions core/public/smartoptimizer/.htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
php_flag zlib.output_compression Off
php_flag output_buffering Off
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

<IfModule php_module>
php_flag output_buffering Off
php_flag zlib.output_compression Off
</IfModule>
11 changes: 9 additions & 2 deletions core/translation/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions core/views/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions data/assetstore/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions log/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
14 changes: 11 additions & 3 deletions modules/.htaccess
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

<FilesMatch "\.(ini|sql|php|phtml|csv)$">
Order allow,deny
Deny from All
</FilesMatch>
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
</FilesMatch>
10 changes: 10 additions & 0 deletions provisioning/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions tests/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
11 changes: 9 additions & 2 deletions tmp/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

Order Allow,Deny
Deny from all
<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>
10 changes: 10 additions & 0 deletions utils/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.

<IfModule authz_core_module>
Require all denied
</IfModule>

<IfModule !authz_core_module>
Order deny,allow
Deny from all
</IfModule>

0 comments on commit ac535d2

Please sign in to comment.