Commit 0406b3d3 authored by Yadd's avatar Yadd
Browse files

Use Makefile variables and propose performances optimization

parent 7c3ce2fc
...@@ -12,13 +12,42 @@ ...@@ -12,13 +12,42 @@
#ErrorLog ${APACHE_LOG_DIR}/lm_err.log #ErrorLog ${APACHE_LOG_DIR}/lm_err.log
#CustomLog ${APACHE_LOG_DIR}/lm.log combined #CustomLog ${APACHE_LOG_DIR}/lm.log combined
# FASTCGI CONFIGURATION
# ---------------------
# 1) URI management
RewriteEngine on RewriteEngine on
RewriteRule "^/$" "/psgi/manager-server.fcgi/$1" [L]
RewriteRule "^/$" "/psgi/manager-server.fcgi/" [L]
# For performances, you can delete the previous RewriteRule line after
# puttings html files: simply put the HTML results of differents modules
# (configuration, sessions, notifications) as manager.html, sessions.html,
# notifications.html and uncomment the 2 following lines:
# DirectoryIndex manager.html
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib).*" RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib).*"
RewriteRule "^/(.*)$" "/psgi/manager-server.fcgi/$1" [L] RewriteRule "^/(.+)$" "/psgi/manager-server.fcgi/$1" [L]
# Note: this example uses mod_fastcgi Alias /psgi/ __MANAGERPSGIDIR__/
FastCgiServer __MANAGERDIR__/psgi/manager-server.fcgi
# 2) FastCGI engine
# You can choose any FastCGI system. Here is an example using mod_fcgid
# mod_fcgid configuration
<Directory __MANAGERPSGIDIR__>
SetHandler fcgid-script
Options +ExecCGI
</Directory>
# If you want to use mod_fastcgi, replace lines bellow by:
#FastCgiServer __MANAGERPSGIDIR__/manager-server.fcgi
# GLOBAL CONFIGURATION
# --------------------
DocumentRoot __MANAGERDIR__
<Location /> <Location />
Require all granted Require all granted
...@@ -36,8 +65,7 @@ ...@@ -36,8 +65,7 @@
</IfModule> </IfModule>
</Location> </Location>
# DocumentRoot # Static files (javascripts, HTML forms,...)
DocumentRoot __MANAGERDIR__
<Directory __MANAGERSTATICDIR__> <Directory __MANAGERSTATICDIR__>
Require all granted Require all granted
Options +FollowSymLinks Options +FollowSymLinks
......
...@@ -12,16 +12,52 @@ ...@@ -12,16 +12,52 @@
#ErrorLog ${APACHE_LOG_DIR}/lm_err.log #ErrorLog ${APACHE_LOG_DIR}/lm_err.log
#CustomLog ${APACHE_LOG_DIR}/lm.log combined #CustomLog ${APACHE_LOG_DIR}/lm.log combined
# FASTCGI CONFIGURATION
# ---------------------
# 1) URI management
RewriteEngine on RewriteEngine on
RewriteRule "^/$" "/psgi/manager-server.fcgi/$1" [L]
RewriteRule "^/$" "/psgi/manager-server.fcgi/" [L]
# For performances, you can delete the previous RewriteRule line after
# puttings html files: simply put the HTML results of differents modules
# (configuration, sessions, notifications) as manager.html, sessions.html,
# notifications.html and uncomment the 2 following lines:
# DirectoryIndex manager.html
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib).*" RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib).*"
RewriteRule "^/(.*)$" "/psgi/manager-server.fcgi/$1" [L] RewriteRule "^/(.+)$" "/psgi/manager-server.fcgi/$1" [L]
Alias /psgi/ __MANAGERPSGIDIR__/
# 2) FastCGI engine
# Note: this example uses mod_fastcgi # You can choose any FastCGI system. Here is an example using mod_fcgid
FastCgiServer __MANAGERDIR__/psgi/manager-server.fcgi # mod_fcgid configuration
<Directory __MANAGERPSGIDIR__>
SetHandler fcgid-script
Options +ExecCGI
</Directory>
# If you want to use mod_fastcgi, replace lines bellow by:
#FastCgiServer __MANAGERPSGIDIR__/manager-server.fcgi
# GLOBAL CONFIGURATION
# --------------------
DocumentRoot __MANAGERDIR__
<Location /> <Location />
Require all granted <IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
Options +FollowSymLinks
<IfModule mod_deflate.c> <IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
...@@ -36,8 +72,7 @@ ...@@ -36,8 +72,7 @@
</IfModule> </IfModule>
</Location> </Location>
# DocumentRoot # Static files (javascripts, HTML forms,...)
DocumentRoot __MANAGERDIR__
<Directory __MANAGERSTATICDIR__> <Directory __MANAGERSTATICDIR__>
<IfVersion >= 2.3> <IfVersion >= 2.3>
Require all granted Require all granted
......
...@@ -12,16 +12,46 @@ ...@@ -12,16 +12,46 @@
#ErrorLog ${APACHE_LOG_DIR}/lm_err.log #ErrorLog ${APACHE_LOG_DIR}/lm_err.log
#CustomLog ${APACHE_LOG_DIR}/lm.log combined #CustomLog ${APACHE_LOG_DIR}/lm.log combined
# FASTCGI CONFIGURATION
# ---------------------
# 1) URI management
RewriteEngine on RewriteEngine on
RewriteRule "^/$" "/psgi/manager-server.fcgi/$1" [L]
RewriteRule "^/$" "/psgi/manager-server.fcgi/" [L]
# For performances, you can delete the previous RewriteRule line after
# puttings html files: simply put the HTML results of differents modules
# (configuration, sessions, notifications) as manager.html, sessions.html,
# notifications.html and uncomment the 2 following lines:
# DirectoryIndex manager.html
# RewriteCond "%{REQUEST_FILENAME}" "!\.html$"
# REST URLs
RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib).*" RewriteCond "%{REQUEST_FILENAME}" "!^/(?:static|doc|fr-doc|lib).*"
RewriteRule "^/(.*)$" "/psgi/manager-server.fcgi/$1" [L] RewriteRule "^/(.+)$" "/psgi/manager-server.fcgi/$1" [L]
# Note: this example uses mod_fastcgi Alias /psgi/ __MANAGERPSGIDIR__/
FastCgiServer __MANAGERDIR__/psgi/manager-server.fcgi
# 2) FastCGI engine
# You can choose any FastCGI system. Here is an example using mod_fcgid
# mod_fcgid configuration
<Directory __MANAGERPSGIDIR__>
SetHandler fcgid-script
Options +ExecCGI
</Directory>
# If you want to use mod_fastcgi, replace lines bellow by:
#FastCgiServer __MANAGERPSGIDIR__/manager-server.fcgi
# GLOBAL CONFIGURATION
# --------------------
DocumentRoot __MANAGERDIR__
<Location /> <Location />
Require all granted Order Deny,Allow
Allow from all
<IfModule mod_deflate.c> <IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
...@@ -36,8 +66,7 @@ ...@@ -36,8 +66,7 @@
</IfModule> </IfModule>
</Location> </Location>
# DocumentRoot # Static files (javascripts, HTML forms,...)
DocumentRoot __MANAGERDIR__
<Directory __MANAGERSTATICDIR__> <Directory __MANAGERSTATICDIR__>
Order deny,allow Order deny,allow
Allow from all Allow from all
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment