View Single Post
  #10  
Old 23rd June 2012, 13:22
baskin baskin is offline
Senior Member
 
Join Date: Jan 2008
Location: Syros, Greece
Posts: 118
Thanks: 9
Thanked 8 Times in 8 Posts
Default

I have the same problem with apache on one vhost only.

I'm just trying to set php to disabled for this host, but it produces an .err vhost file instead of writing to the working copy.

I have also tried to manually copy the .err file and restart apache but it fails.

Working copy:

Code:
<Directory /var/www/my.domain.tld>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost xxx.xxx.xxx.xxx:80>
      DocumentRoot /var/www/my.domain.tld/web
  
    ServerName my.domain.tld
    ServerAdmin webmaster@my.domain.tld

    ErrorLog /var/log/ispconfig/httpd/my.domain.tld/error.log


    <IfModule mod_ssl.c>
    </IfModule>

    <Directory /var/www/my.domain.tld/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web5/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>



    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
	# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
    <IfModule mod_fcgid.c>
        IdleTimeout 300
        ProcessLifeTime 3600
        # MaxProcessCount 1000
        DefaultMinClassProcessCount 0
        DefaultMaxClassProcessCount 100
        IPCConnectTimeout 3
        IPCCommTimeout 360
        BusyTimeout 300
    </IfModule>
    <Directory /var/www/my.domain.tld/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web5/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web5 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
	  # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client1/web5/webdav>
	    <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client1/web5/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>

RewriteEngine on

ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

RewriteRule ^/fastpath/(.*)$ /fastpath/$1 [PT,L]
RewriteRule ^/static/(.*)$ /static/$1 [PT,L]
RewriteRule ^/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=0&_webmcp_module=index&_webmcp_view=index&$2 [PT,QSA]
RewriteRule ^/([^/\?]+)/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=index&$3 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\.\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_action=$2&$4 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=$2&_webmcp_suffix=$3&$5 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=2&_webmcp_module=$1&_webmcp_view=$2&_webmcp_id=$3&_webmcp_suffix=$4&$6 [PT,QSA]

Alias /static/ /var/www/my.domain.tld/liquid_feedback_frontend/static/

ScriptAlias /fastpath/getpic /var/www/my.domain.tld/liquid_feedback_frontend/fastpath/getpic
<Directory "/var/www/my.domain.tld/liquid_feedback_frontend/fastpath/">
	AllowOverride None
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

ScriptAlias /cgi-bin /var/www/my.domain.tld/webmcp/cgi-bin
<Directory "/var/www/my.domain.tld/webmcp/cgi-bin/">
	AllowOverride None
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

<Location />
	SetEnv LANG 'en_US.UTF-8'
	SetEnv WEBMCP_APP_BASEPATH '/var/www/my.domain.tld/liquid_feedback_frontend/'
	SetEnv WEBMCP_CONFIG_NAME 'testing'
</Location>

<Directory "/var/www/my.domain.tld/liquid_feedback_frontend/static/">
	AllowOverride None
	Options None
	Order allow,deny
	Allow from all
</Directory>


</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:443>
      DocumentRoot /var/www/my.domain.tld/web
  
    ServerName my.domain.tld
    ServerAdmin webmaster@my.domain.tld

    ErrorLog /var/log/ispconfig/httpd/my.domain.tld/error.log


    <IfModule mod_ssl.c>
	SSLEngine on
    SSLCertificateFile /var/www/clients/client1/web5/ssl/my.domain.tld.crt
    SSLCertificateKeyFile /var/www/clients/client1/web5/ssl/my.domain.tld.key
    </IfModule>

    <Directory /var/www/my.domain.tld/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web5/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>



    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
	# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
    <IfModule mod_fcgid.c>
        IdleTimeout 300
        ProcessLifeTime 3600
        # MaxProcessCount 1000
        DefaultMinClassProcessCount 0
        DefaultMaxClassProcessCount 100
        IPCConnectTimeout 3
        IPCCommTimeout 360
        BusyTimeout 300
    </IfModule>
    <Directory /var/www/my.domain.tld/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web5/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web5 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
	  # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client1/web5/webdav>
	    <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client1/web5/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>

RewriteEngine on

ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

RewriteRule ^/fastpath/(.*)$ /fastpath/$1 [PT,L]
RewriteRule ^/static/(.*)$ /static/$1 [PT,L]
RewriteRule ^/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=0&_webmcp_module=index&_webmcp_view=index&$2 [PT,QSA]
RewriteRule ^/([^/\?]+)/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=index&$3 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\.\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_action=$2&$4 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=$2&_webmcp_suffix=$3&$5 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=2&_webmcp_module=$1&_webmcp_view=$2&_webmcp_id=$3&_webmcp_suffix=$4&$6 [PT,QSA]

Alias /static/ /var/www/my.domain.tld/liquid_feedback_frontend/static/

ScriptAlias /fastpath/getpic /var/www/my.domain.tld/liquid_feedback_frontend/fastpath/getpic
<Directory "/var/www/my.domain.tld/liquid_feedback_frontend/fastpath/">
	AllowOverride None
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

ScriptAlias /cgi-bin /var/www/my.domain.tld/webmcp/cgi-bin
<Directory "/var/www/my.domain.tld/webmcp/cgi-bin/">
	AllowOverride None
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

<Location />
	SetEnv LANG 'en_US.UTF-8'
	SetEnv WEBMCP_APP_BASEPATH '/var/www/my.domain.tld/liquid_feedback_frontend/'
	SetEnv WEBMCP_CONFIG_NAME 'testing'
</Location>

<Directory "/var/www/my.domain.tld/liquid_feedback_frontend/static/">
	AllowOverride None
	Options None
	Order allow,deny
	Allow from all
</Directory>


</VirtualHost>
Non working .err file

Code:
<Directory /var/www/my.domain.tld>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost xxx.xxx.xxx.xxx:80>
      DocumentRoot /var/www/my.domain.tld/web
  
    ServerName my.domain.tld
    ServerAdmin webmaster@my.domain.tld

    ErrorLog /var/log/ispconfig/httpd/my.domain.tld/error.log


    <IfModule mod_ssl.c>
    </IfModule>

    <Directory /var/www/my.domain.tld/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        <Files ~ '.php[s3-6]{0,1}$'>
            Order allow,deny
            Deny from all
            Allow from none
        </Files>
    </Directory>
    <Directory /var/www/clients/client1/web5/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        <Files ~ '.php[s3-6]{0,1}$'>
            Order allow,deny
            Deny from all
            Allow from none
        </Files>
    </Directory>



    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web5 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
	  # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client1/web5/webdav>
	    <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client1/web5/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>

RewriteEngine on

ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

RewriteRule ^/fastpath/(.*)$ /fastpath/$1 [PT,L]
RewriteRule ^/static/(.*)$ /static/$1 [PT,L]
RewriteRule ^/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=0&_webmcp_module=index&_webmcp_view=index&$2 [PT,QSA]
RewriteRule ^/([^/\?]+)/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=index&$3 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\.\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_action=$2&$4 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=$2&_webmcp_suffix=$3&$5 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=2&_webmcp_module=$1&_webmcp_view=$2&_webmcp_id=$3&_webmcp_suffix=$4&$6 [PT,QSA]

Alias /static/ /var/www/my.domain.tld/liquid_feedback_frontend/static/

ScriptAlias /fastpath/getpic /var/www/my.domain.tld/liquid_feedback_frontend/fastpath/getpic
<Directory "/var/www/my.domain.tld/liquid_feedback_frontend/fastpath/">
	AllowOverride None
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

ScriptAlias /cgi-bin /var/www/my.domain.tld/webmcp/cgi-bin
<Directory "/var/www/my.domain.tld/webmcp/cgi-bin/">
	AllowOverride None
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

<Location />
	SetEnv LANG 'en_US.UTF-8'
	SetEnv WEBMCP_APP_BASEPATH '/var/www/my.domain.tld/liquid_feedback_frontend/'
	SetEnv WEBMCP_CONFIG_NAME 'testing'
</Location>

<Directory "/var/www/my.domain.tld/liquid_feedback_frontend/static/">
	AllowOverride None
	Options None
	Order allow,deny
	Allow from all
</Directory>

<IfModule mod_ssl.c>
SSLEngine on
SSLCertificateChainFile /var/www/my.domain.tld/ssl/sub.class1.server.ca.pem
</IfModule>
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:443>
      DocumentRoot /var/www/my.domain.tld/web
  
    ServerName my.domain.tld
    ServerAdmin webmaster@my.domain.tld

    ErrorLog /var/log/ispconfig/httpd/my.domain.tld/error.log


    <IfModule mod_ssl.c>
	SSLEngine on
    SSLCertificateFile /var/www/clients/client1/web5/ssl/my.domain.tld.crt
    SSLCertificateKeyFile /var/www/clients/client1/web5/ssl/my.domain.tld.key
    </IfModule>

    <Directory /var/www/my.domain.tld/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        <Files ~ '.php[s3-6]{0,1}$'>
            Order allow,deny
            Deny from all
            Allow from none
        </Files>
    </Directory>
    <Directory /var/www/clients/client1/web5/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        <Files ~ '.php[s3-6]{0,1}$'>
            Order allow,deny
            Deny from all
            Allow from none
        </Files>
    </Directory>



    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web5 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
	  # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client1/web5/webdav>
	    <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client1/web5/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>

RewriteEngine on

ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

RewriteRule ^/fastpath/(.*)$ /fastpath/$1 [PT,L]
RewriteRule ^/static/(.*)$ /static/$1 [PT,L]
RewriteRule ^/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=0&_webmcp_module=index&_webmcp_view=index&$2 [PT,QSA]
RewriteRule ^/([^/\?]+)/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=index&$3 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\.\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_action=$2&$4 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=$2&_webmcp_suffix=$3&$5 [PT,QSA]
RewriteRule ^/([^/\?]+)/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=2&_webmcp_module=$1&_webmcp_view=$2&_webmcp_id=$3&_webmcp_suffix=$4&$6 [PT,QSA]

Alias /static/ /var/www/my.domain.tld/liquid_feedback_frontend/static/

ScriptAlias /fastpath/getpic /var/www/my.domain.tld/liquid_feedback_frontend/fastpath/getpic
<Directory "/var/www/my.domain.tld/liquid_feedback_frontend/fastpath/">
	AllowOverride None
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

ScriptAlias /cgi-bin /var/www/my.domain.tld/webmcp/cgi-bin
<Directory "/var/www/my.domain.tld/webmcp/cgi-bin/">
	AllowOverride None
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

<Location />
	SetEnv LANG 'en_US.UTF-8'
	SetEnv WEBMCP_APP_BASEPATH '/var/www/my.domain.tld/liquid_feedback_frontend/'
	SetEnv WEBMCP_CONFIG_NAME 'testing'
</Location>

<Directory "/var/www/my.domain.tld/liquid_feedback_frontend/static/">
	AllowOverride None
	Options None
	Order allow,deny
	Allow from all
</Directory>

<IfModule mod_ssl.c>
SSLEngine on
SSLCertificateChainFile /var/www/my.domain.tld/ssl/sub.class1.server.ca.pem
</IfModule>
</VirtualHost>
It is a little complicated setup but it is working. All addittions to the vhost file have been made through ispconfig's web interface.

I have tried to make the same change (php disabled) to another vhost and it is working.

Thnaks in advance.

Last edited by baskin; 23rd June 2012 at 13:42.
Reply With Quote