Better Apache path management

This commit is contained in:
Xavier Guimard 2015-06-11 05:35:41 +00:00
parent 91be95583e
commit 5c069d34b9
3 changed files with 15 additions and 25 deletions

View File

@ -15,10 +15,6 @@
Require all granted Require all granted
Options +FollowSymLinks Options +FollowSymLinks
</Directory> </Directory>
<Directory __MANAGERPSGIDIR__>
Require all granted
Options +FollowSymLinks
</Directory>
# On-line documentation # On-line documentation
Alias /doc/ __DEFDOCDIR__ Alias /doc/ __DEFDOCDIR__
@ -40,13 +36,16 @@
# Perl script # Perl script
# Note: to increase performance, you can avoid manager stay in memory # Note: to increase performance, you can avoid manager stay in memory
# by using "SetHandler cgi-script" instead of Plack framework # by using "SetHandler cgi-script" instead of Plack framework
<FilesMatch \.psgi$> RewriteEngine on
RewriteRule ^/$ /index.pl [R]
<Location /index.pl>
Require all granted
#SetHandler cgi-script #SetHandler cgi-script
Options +ExecCGI Options +ExecCGI
SetHandler perl-script SetHandler perl-script
PerlResponseHandler Plack::Handler::Apache2 PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app __MANAGERPSGIDIR__/manager-server.psgi PerlSetVar psgi_app __MANAGERPSGIDIR__/manager-server.psgi
</FilesMatch> </Location>
<Location /> <Location />
<IfModule mod_deflate.c> <IfModule mod_deflate.c>

View File

@ -21,16 +21,6 @@
</IfVersion> </IfVersion>
Options +FollowSymLinks Options +FollowSymLinks
</Directory> </Directory>
<Directory __MANAGERPSGIDIR__>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
Options +FollowSymLinks
</Directory>
# On-line documentation # On-line documentation
Alias /doc/ __DEFDOCDIR__ Alias /doc/ __DEFDOCDIR__
@ -64,13 +54,16 @@
# Perl script # Perl script
# Note: to increase performance, you can avoid manager stay in memory # Note: to increase performance, you can avoid manager stay in memory
# by using "SetHandler cgi-script" instead of Plack framework # by using "SetHandler cgi-script" instead of Plack framework
<FilesMatch \.psgi$> RewriteEngine on
RewriteRule ^/$ /index.pl [R]
<Location /index.pl>
Require all granted
#SetHandler cgi-script #SetHandler cgi-script
Options +ExecCGI Options +ExecCGI
SetHandler perl-script SetHandler perl-script
PerlResponseHandler Plack::Handler::Apache2 PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app __MANAGERPSGIDIR__/manager-server.psgi PerlSetVar psgi_app __MANAGERPSGIDIR__/manager-server.psgi
</FilesMatch> </Location>
<Location /> <Location />
<IfModule mod_deflate.c> <IfModule mod_deflate.c>

View File

@ -16,11 +16,6 @@
Allow from all Allow from all
Options +FollowSymLinks Options +FollowSymLinks
</Directory> </Directory>
<Directory __MANAGERPSGIDIR__>
Order deny,allow
Allow from all
Options +FollowSymLinks
</Directory>
# On-line documentation # On-line documentation
Alias /doc/ __DEFDOCDIR__ Alias /doc/ __DEFDOCDIR__
@ -44,13 +39,16 @@
# Perl script # Perl script
# Note: to increase performance, you can avoid manager stay in memory # Note: to increase performance, you can avoid manager stay in memory
# by using "SetHandler cgi-script" instead of Plack framework # by using "SetHandler cgi-script" instead of Plack framework
<FilesMatch \.psgi$> RewriteEngine on
RewriteRule ^/$ /index.pl [R]
<Location /index.pl>
Require all granted
#SetHandler cgi-script #SetHandler cgi-script
Options +ExecCGI Options +ExecCGI
SetHandler perl-script SetHandler perl-script
PerlResponseHandler Plack::Handler::Apache2 PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app __MANAGERPSGIDIR__/manager-server.psgi PerlSetVar psgi_app __MANAGERPSGIDIR__/manager-server.psgi
</FilesMatch> </Location>
<Location /> <Location />
<IfModule mod_deflate.c> <IfModule mod_deflate.c>