dwm
Verified User
I am using Apache 2.0. After i added users the system did a rewrite of the ips.conf and that config is using an if/else procedure. Check the default template:
cp /usr/local/directadmin/data/templates/ips_virtual_host.conf /usr/local/directadmin/data/templates/custom/ips_virtual_host.conf
pico /usr/local/directadmin/data/templates/custom/ips_virtual_host.conf
You can configure your apache version if it is incorrect defined in your config by editing /usr/local/directadmin/custombuild/options.conf . I use the 2.0 version, so you would expect DirectAdmin should write 'SuexecUserGroup customer' instead of 'User customer
Group customer'. But that is not true. For some reason DirectAdmin writes the last one if you are using the 2.0 version.
I cant get this to work so i just deleted the if/else/endif from the template. Now Directadmin doesnt have to make choices anymore and my config is always correct for the time i use apache 2.0.
My new template looks like this:
cp /usr/local/directadmin/data/templates/ips_virtual_host.conf /usr/local/directadmin/data/templates/custom/ips_virtual_host.conf
pico /usr/local/directadmin/data/templates/custom/ips_virtual_host.conf
<VirtualHost |IP|:80>
ServerName shared.domain
ScriptAliasMatch ^/~([^/]+)/+cgi-bin/+(.*) /home/$1/public_html/cgi-bin/$2
AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
DocumentRoot |DOCROOT|
|*if APACHE_VER="2.0"|
SuexecUserGroup |USER| |GROUP|
|*else|
User |USER|
Group |GROUP|
|*endif|
CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>
<VirtualHost |IP|:443>
SSLEngine on
SSLCertificateFile |CERT|
SSLCertificateKeyFile |KEY|
ServerName shared.domain
ScriptAliasMatch ^/~([^/]+)/+cgi-bin/+(.*) /home/$1/public_html/cgi-bin/$2
AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
DocumentRoot |DOCROOT|
|*if APACHE_VER="2.0"|
SuexecUserGroup |USER| |GROUP|
|*else|
User |USER|
Group |GROUP|
|*endif|
CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>
You can configure your apache version if it is incorrect defined in your config by editing /usr/local/directadmin/custombuild/options.conf . I use the 2.0 version, so you would expect DirectAdmin should write 'SuexecUserGroup customer' instead of 'User customer
Group customer'. But that is not true. For some reason DirectAdmin writes the last one if you are using the 2.0 version.
# /etc/init.d/httpd start
Starting httpd: Syntax error on line 15 of /etc/httpd/conf/ips.conf:
User cannot occur within <VirtualHost> section
I cant get this to work so i just deleted the if/else/endif from the template. Now Directadmin doesnt have to make choices anymore and my config is always correct for the time i use apache 2.0.
My new template looks like this:
<VirtualHost |IP|:80>
ServerName shared.domain
ScriptAliasMatch ^/~([^/]+)/+cgi-bin/+(.*) /home/$1/public_html/cgi-bin/$2
AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
DocumentRoot |DOCROOT|
SuexecUserGroup |USER| |GROUP|
CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>
<VirtualHost |IP|:443>
SSLEngine on
SSLCertificateFile |CERT|
SSLCertificateKeyFile |KEY|
ServerName shared.domain
ScriptAliasMatch ^/~([^/]+)/+cgi-bin/+(.*) /home/$1/public_html/cgi-bin/$2
AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
DocumentRoot |DOCROOT|
SuexecUserGroup |USER| |GROUP|
CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>
Last edited: