From a5c833b59dda4aef682ab1a992f9d2eb6d08ad10 Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Wed, 17 Dec 2008 13:23:38 -0500
Subject: [PATCH] fixed session error when changing from nonssl to ssl and fast-cgi is active. Problem was different web-root dir in ssl-directive!
---
server/conf/vhost.conf.master | 237 ++++++++++++++++++++++++++++++-----------------------------
1 files changed, 121 insertions(+), 116 deletions(-)
diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index 3b8248d..b7492e1 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -1,98 +1,98 @@
<VirtualHost <tmpl_var name='ip_address'>:80>
<tmpl_if name='php' op='==' value='suphp'>
- DocumentRoot <tmpl_var name='web_document_root'>
+ DocumentRoot <tmpl_var name='web_document_root'>
</tmpl_else>
- DocumentRoot <tmpl_var name='web_document_root_www'>
+ DocumentRoot <tmpl_var name='web_document_root_www'>
</tmpl_if>
- ServerName <tmpl_var name='domain'>
+ ServerName <tmpl_var name='domain'>
<tmpl_if name='alias'>
- ServerAlias <tmpl_var name='alias'>
+ ServerAlias <tmpl_var name='alias'>
</tmpl_if>
- ServerAdmin webmaster@<tmpl_var name='domain'>
+ ServerAdmin webmaster@<tmpl_var name='domain'>
- ErrorLog <tmpl_var name='document_root'>/log/error.log
+ ErrorLog <tmpl_var name='document_root'>/log/error.log
<tmpl_if name='errordocs'>
- ErrorDocument 400 /error/invalidSyntax.html
- ErrorDocument 401 /error/authorizationRequired.html
- ErrorDocument 403 /error/forbidden.html
- ErrorDocument 404 /error/fileNotFound.html
- ErrorDocument 405 /error/methodNotAllowed.html
- ErrorDocument 500 /error/internalServerError.html
- ErrorDocument 503 /error/overloaded.html
+ ErrorDocument 400 /error/invalidSyntax.html
+ ErrorDocument 401 /error/authorizationRequired.html
+ ErrorDocument 403 /error/forbidden.html
+ ErrorDocument 404 /error/fileNotFound.html
+ ErrorDocument 405 /error/methodNotAllowed.html
+ ErrorDocument 500 /error/internalServerError.html
+ ErrorDocument 503 /error/overloaded.html
</tmpl_if>
- <Directory {tmpl_var name='web_document_root_www'}>
- Options FollowSymLinks
- AllowOverride Indexes AuthConfig Limit FileInfo
- Order allow,deny
- Allow from all
+ <Directory {tmpl_var name='web_document_root_www'}>
+ Options FollowSymLinks
+ AllowOverride Indexes AuthConfig Limit FileInfo
+ Order allow,deny
+ Allow from all
<tmpl_if name='ssi' op='==' value='y'>
-
- # ssi enabled
- AddType text/html .shtml
- AddOutputFilter INCLUDES .shtml
- Options +Includes
+
+ # ssi enabled
+ AddType text/html .shtml
+ AddOutputFilter INCLUDES .shtml
+ Options +Includes
</tmpl_if>
- </Directory>
+ </Directory>
<tmpl_if name='cgi' op='==' value='y'>
- # cgi enabled
- ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/
- AddHandler cgi-script .cgi
- AddHandler cgi-script .pl
+ # cgi enabled
+ ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/
+ AddHandler cgi-script .cgi
+ AddHandler cgi-script .pl
</tmpl_if>
<tmpl_if name='suexec' op='==' value='y'>
- # suexec enabled
- SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
+ # suexec enabled
+ SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
</tmpl_if>
<tmpl_if name='php' op='==' value='mod'>
- # mod_php enabled
- AddType application/x-httpd-php .php .php3 .php4 .php5
+ # mod_php enabled
+ AddType application/x-httpd-php .php .php3 .php4 .php5
</tmpl_if>
<tmpl_if name='php' op='==' value='suphp'>
- # suphp enabled
- <Directory {tmpl_var name='web_document_root'}>
- suPHP_Engine on
- # suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
- AddHandler x-httpd-suphp .php .php3 .php4 .php5
- suPHP_AddHandler x-httpd-suphp
- </Directory>
+ # suphp enabled
+ <Directory {tmpl_var name='web_document_root'}>
+ suPHP_Engine on
+ # suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
+ AddHandler x-httpd-suphp .php .php3 .php4 .php5
+ suPHP_AddHandler x-httpd-suphp
+ </Directory>
</tmpl_if>
<tmpl_if name='php' op='==' value='cgi'>
- # php as cgi enabled
- AddType application/x-httpd-php .php .php3 .php4 .php5
+ # php as cgi enabled
+ AddType application/x-httpd-php .php .php3 .php4 .php5
</tmpl_if>
<tmpl_if name='php' op='==' value='fast-cgi'>
- # php as fast-cgi enabled
- <Directory {tmpl_var name='web_document_root_www'}>
- AddHandler fcgid-script .php .php3 .php4 .php5
- FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php
- Options +ExecCGI
- AllowOverride all
- Order allow,deny
- Allow from all
- </Directory>
+ # php as fast-cgi enabled
+ <Directory {tmpl_var name='web_document_root_www'}>
+ AddHandler fcgid-script .php .php3 .php4 .php5
+ FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php
+ Options +ExecCGI
+ AllowOverride all
+ Order allow,deny
+ Allow from all
+ </Directory>
</tmpl_if>
<tmpl_if name="rewrite_enabled">
-
- RewriteEngine on
+
+ RewriteEngine on
<tmpl_loop name="redirects">
- RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
- RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
+ RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
+ RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
</tmpl_loop>
</tmpl_if>
<tmpl_if name='php' op='!=' value=''>
-
- php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
- php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
- php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
- #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
+
+ php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
+ php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
+ php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
+ #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
</tmpl_if>
- <tmpl_var name='apache_directives'>
+<tmpl_var name='apache_directives'>
</VirtualHost>
@@ -104,91 +104,96 @@
###########################################################
<VirtualHost <tmpl_var name='ip_address'>:443>
- DocumentRoot <tmpl_var name='web_document_root'>
- ServerName <tmpl_var name='domain'>
-<tmpl_if name='alias'>
- ServerAlias <tmpl_var name='alias'>
+<tmpl_if name='php' op='==' value='suphp'>
+ DocumentRoot <tmpl_var name='web_document_root'>
+</tmpl_else>
+ DocumentRoot <tmpl_var name='web_document_root_www'>
</tmpl_if>
- ServerAdmin webmaster@<tmpl_var name='domain'>
-
- ErrorLog <tmpl_var name='document_root'>/log/error.log
+
+ ServerName <tmpl_var name='domain'>
+<tmpl_if name='alias'>
+ ServerAlias <tmpl_var name='alias'>
+</tmpl_if>
+ ServerAdmin webmaster@<tmpl_var name='domain'>
+
+ ErrorLog <tmpl_var name='document_root'>/log/error.log
<tmpl_if name='is_errordocs'>
- ErrorDocument 400 /error/invalidSyntax.html
- ErrorDocument 401 /error/authorizationRequired.html
- ErrorDocument 403 /error/forbidden.html
- ErrorDocument 404 /error/fileNotFound.html
- ErrorDocument 405 /error/methodNotAllowed.html
- ErrorDocument 500 /error/internalServerError.html
- ErrorDocument 503 /error/overloaded.html
+ ErrorDocument 400 /error/invalidSyntax.html
+ ErrorDocument 401 /error/authorizationRequired.html
+ ErrorDocument 403 /error/forbidden.html
+ ErrorDocument 404 /error/fileNotFound.html
+ ErrorDocument 405 /error/methodNotAllowed.html
+ ErrorDocument 500 /error/internalServerError.html
+ ErrorDocument 503 /error/overloaded.html
</tmpl_if>
- SSLEngine on
- SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.crt
- SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.key
+ SSLEngine on
+ SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.crt
+ SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.key
<tmpl_if name='has_bundle_cert'>
- SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.bundle
+ SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.bundle
</tmpl_if>
<tmpl_if name='cgi'op='==' value='y'>
- # cgi enabled
- ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/
- AddHandler cgi-script .cgi
- AddHandler cgi-script .pl
+ # cgi enabled
+ ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/
+ AddHandler cgi-script .cgi
+ AddHandler cgi-script .pl
</tmpl_if>
<tmpl_if name='ssi'op='==' value='y'>
- # ssi enabled
- AddType text/html .shtml
- AddOutputFilter INCLUDES .shtml
+ # ssi enabled
+ AddType text/html .shtml
+ AddOutputFilter INCLUDES .shtml
</tmpl_if>
<tmpl_if name='suexec'op='==' value='y'>
- # suexec enabled
- SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
+ # suexec enabled
+ SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
</tmpl_if>
<tmpl_if name='php' op='==' value='mod'>
- # mod_php enabled
- AddType application/x-httpd-php .php .php3 .php4 .php5
+ # mod_php enabled
+ AddType application/x-httpd-php .php .php3 .php4 .php5
</tmpl_if>
<tmpl_if name='php' op='==' value='suphp'>
- # suphp enabled
- suPHP_Engine on
- suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
- AddHandler x-httpd-php .php .php3 .php4 .php5
- suPHP_AddHandler x-httpd-php
+ # suphp enabled
+ suPHP_Engine on
+ suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
+ AddHandler x-httpd-php .php .php3 .php4 .php5
+ suPHP_AddHandler x-httpd-php
</tmpl_if>
<tmpl_if name='php' op='==' value='cgi'>
- # php as cgi enabled
- AddType application/x-httpd-php .php .php3 .php4 .php5
+ # php as cgi enabled
+ AddType application/x-httpd-php .php .php3 .php4 .php5
</tmpl_if>
<tmpl_if name='php' op='==' value='fast-cgi'>
- # php as fast-cgi enabled
- <Directory {tmpl_var name='web_document_root_www'}>
- AddHandler fcgid-script .php .php3 .php4 .php5
- FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php
- Options +ExecCGI
- AllowOverride all
- Order allow,deny
- Allow from all
- </Directory>
+ # php as fast-cgi enabled
+ <Directory {tmpl_var name='web_document_root_www'}>
+ AddHandler fcgid-script .php .php3 .php4 .php5
+ FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php
+ Options +ExecCGI
+ AllowOverride all
+ Order allow,deny
+ Allow from all
+ </Directory>
</tmpl_if>
<tmpl_if name="rewrite_enabled">
-
- RewriteEngine on
+
+ RewriteEngine on
<tmpl_loop name="redirects">
-
- RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
- RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
+
+ RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
+ RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
</tmpl_loop>
</tmpl_if>
<tmpl_if name='php' op='!=' value=''>
-
- php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
- php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
- php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
- #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
+
+ php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
+ php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
+ php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
+ #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
</tmpl_if>
- <tmpl_var name='apache_directives'>
+<tmpl_var name='apache_directives'>
</VirtualHost>
</IfModule>
--
Gitblit v1.9.1