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

Commit ac535d2

Browse files
author
Jamie Snape
committed
Apache 2.4 and PHP FPM support
1 parent 7910a39 commit ac535d2

File tree

18 files changed

+186
-68
lines changed

18 files changed

+186
-68
lines changed

.htaccess

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
<IfModule mod_rewrite.c>
2-
# Zend rewrite rules
3-
RewriteEngine on
4-
RewriteCond %{REQUEST_FILENAME} !-f
5-
RewriteRule .* index.php
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
62

7-
</IfModule>
8-
9-
# Security: no folder fetching
103
Options -Indexes
114

12-
# Configuration PHP
13-
php_flag magic_quotes_gpc off
14-
php_flag register_globals off
15-
php_flag short_open_tag on
5+
<IfModule deflate_module>
6+
SetOutputFilter DEFLATE
7+
BrowserMatch ^Mozilla/4 gzip-only-text/html
8+
BrowserMatch ^Mozilla/4.0[678] no-gzip
9+
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
10+
</IfModule>
11+
12+
<IfModule php_module>
13+
php_flag magic_quotes_gpc off
14+
php_flag register_globals off
15+
php_flag short_open_tag on
16+
</IfModule>
1617

17-
<IfModule mod_deflate.c>
18-
# Compress output
19-
SetOutputFilter DEFLATE
20-
BrowserMatch ^Mozilla/4 gzip-only-text/html
21-
BrowserMatch ^Mozilla/4.0[678] no-gzip
22-
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
18+
<IfModule rewrite_module>
19+
RewriteEngine on
20+
RewriteCond %{REQUEST_FILENAME} !-f
21+
RewriteRule .* index.php
2322
</IfModule>

core/configs/.htaccess

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
12

2-
Order Allow,Deny
3-
Deny from all
3+
<IfModule authz_core_module>
4+
Require all denied
5+
</IfModule>
6+
7+
<IfModule !authz_core_module>
8+
Order deny,allow
9+
Deny from all
10+
</IfModule>

core/constant/.htaccess

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
12

2-
Order Allow,Deny
3-
Deny from all
3+
<IfModule authz_core_module>
4+
Require all denied
5+
</IfModule>
6+
7+
<IfModule !authz_core_module>
8+
Order deny,allow
9+
Deny from all
10+
</IfModule>

core/controllers/.htaccess

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
12

2-
Order Allow,Deny
3-
Deny from all
3+
<IfModule authz_core_module>
4+
Require all denied
5+
</IfModule>
6+
7+
<IfModule !authz_core_module>
8+
Order deny,allow
9+
Deny from all
10+
</IfModule>

core/database/.htaccess

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
12

2-
Order Allow,Deny
3-
Deny from all
3+
<IfModule authz_core_module>
4+
Require all denied
5+
</IfModule>
6+
7+
<IfModule !authz_core_module>
8+
Order deny,allow
9+
Deny from all
10+
</IfModule>

core/layouts/.htaccess

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
12

2-
Order Allow,Deny
3-
Deny from all
3+
<IfModule authz_core_module>
4+
Require all denied
5+
</IfModule>
6+
7+
<IfModule !authz_core_module>
8+
Order deny,allow
9+
Deny from all
10+
</IfModule>

core/models/.htaccess

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
12

2-
Order Allow,Deny
3-
Deny from all
3+
<IfModule authz_core_module>
4+
Require all denied
5+
</IfModule>
6+
7+
<IfModule !authz_core_module>
8+
Order deny,allow
9+
Deny from all
10+
</IfModule>

core/public/.htaccess

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
<IfModule mod_expires.c>
2-
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
3-
ExpiresActive On
4-
ExpiresDefault "access plus 10 years"
5-
</FilesMatch>
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
2+
3+
<IfModule expires_module>
4+
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
5+
ExpiresActive On
6+
ExpiresDefault "access plus 10 years"
7+
</FilesMatch>
68
</IfModule>
7-
<IfModule mod_rewrite.c>
8-
RewriteEngine On
9-
10-
RewriteCond %{REQUEST_FILENAME} !-f
11-
RewriteCond %{REQUEST_FILENAME} !-d
12-
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1
13-
14-
<IfModule mod_expires.c>
15-
RewriteCond %{REQUEST_FILENAME} -f
16-
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
17-
</IfModule>
189

19-
<IfModule !mod_expires.c>
20-
RewriteCond %{REQUEST_FILENAME} -f
21-
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1
22-
</IfModule>
10+
<IfModule rewrite_module>
11+
RewriteEngine On
12+
RewriteCond %{REQUEST_FILENAME} !-f
13+
RewriteCond %{REQUEST_FILENAME} !-d
14+
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1
15+
16+
<IfModule expires_module>
17+
RewriteCond %{REQUEST_FILENAME} -f
18+
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
19+
</IfModule>
20+
21+
<IfModule !expires_module>
22+
RewriteCond %{REQUEST_FILENAME} -f
23+
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico))$ smartoptimizer/?$1
24+
</IfModule>
2325
</IfModule>
26+
2427
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt|ico)$">
25-
FileETag none
28+
FileETag none
2629
</FilesMatch>
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
php_flag zlib.output_compression Off
2-
php_flag output_buffering Off
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
2+
3+
<IfModule php_module>
4+
php_flag output_buffering Off
5+
php_flag zlib.output_compression Off
6+
</IfModule>

core/translation/.htaccess

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# MIDAS Server. Copyright Kitware SAS. Licensed under the Apache License 2.0.
12

2-
Order Allow,Deny
3-
Deny from all
3+
<IfModule authz_core_module>
4+
Require all denied
5+
</IfModule>
6+
7+
<IfModule !authz_core_module>
8+
Order deny,allow
9+
Deny from all
10+
</IfModule>

0 commit comments

Comments
 (0)