http templates error

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
Hi i dont know what i did but there seems to be an error in my httpd templates

I get this error after rebuild, so its pretty persistant ((

AH00526: Syntax error on line 21 of /usr/local/directadmin/data/users/martin/httpd.conf:
<VirtualHost> cannot occur within <VirtualHost> section

If i remove the entry it is back after a while of course, but i cant find the error in the template files.

Is there a way to reinstall the templates?
 

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
Code:
<Directory "/home/martin/public_html">
        <FilesMatch "\.(inc|php|phtml|phps|php73)$">
            AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73
        </FilesMatch>
    <IfModule mod_fcgid.c>
        SuexecUserGroup martin martin
    </IfModule>
</Directory>

<VirtualHost 209.250.241.172:80 >
<VirtualHost 209.250.241.172:443 >
    SSLEngine on
    SSLCertificateFile /usr/local/directadmin/data/users/martin/domains/url.eu.cert.combined
    SSLCertificateKeyFile /usr/local/directadmin/data/users/martin/domains/url.eu.key
    SSLCACertificateFile /usr/local/directadmin/data/users/martin/domains/url.eu.cacert   
    ServerName www.pbx.url.eu
    ServerAlias www.pbx.url.eu pbx.yumminova.eu
    ServerAdmin webmaster@url.eu
    DocumentRoot /home/martin/domains/url.eu/private_html/manage
       ProxyPass / http://urlhere:8000/
       ProxyPassReverse / http://urlhere:8000/
    UseCanonicalName OFF
    <IfModule !mod_ruid2.c>
        SuexecUserGroup martin martin
    </IfModule>
    CustomLog /var/log/httpd/domains/url.eu.pbx.bytes bytes
    CustomLog /var/log/httpd/domains/url.eu.pbx.log combined
    ErrorLog /var/log/httpd/domains/url.eu.pbx.error.log
    <Directory /home/martin/domains/url.eu/private_html>
        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
        Options -ExecCGI -Includes +IncludesNOEXEC
        <FilesMatch "\.(inc|php|phtml|phps|php73)$">
            <If "-f %{REQUEST_FILENAME}">
                #ProxyErrorOverride on
                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73
            </If>
        </FilesMatch>
    </Directory>
</VirtualHost>
 
Last edited:

kacperinjo

Verified User
Joined
Jun 28, 2011
Messages
17
Show your file: /usr/local/directadmin/data/users/martin/httpd.conf


When you use ./build rewrite_confs

Does this problem still occur?
 

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
Code:
# Auto generated apache config file by DirectAdmin version 1.59.5

# Modifying this file is not recommended as any changes you make will be

# overwritten when the user makes any changes to their website



# For global config changes that affect all Users, see this guide:

# http://help.directadmin.com/item.php?id=2

# For local config changes that only affect one User, see this guide:

# http://help.directadmin.com/item.php?id=3





<Directory "/home/martin/public_html">

        <FilesMatch "\.(inc|php|phtml|phps|php73)$">

            AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73

        </FilesMatch>

    <IfModule mod_fcgid.c>

        SuexecUserGroup martin martin

    </IfModule>

</Directory>



<VirtualHost 209.250.241.172:8080 127.0.0.1:8080 >

<VirtualHost 209.250.241.172:443 >

    SSLEngine on

    SSLCertificateFile /usr/local/directadmin/data/users/martin/domains/domain.eu.cert.combined

    SSLCertificateKeyFile /usr/local/directadmin/data/users/martin/domains/domain.eu.key

    SSLCACertificateFile /usr/local/directadmin/data/users/martin/domains/domain.eu.cacert 

    ServerName www.pbx.domain.eu

    ServerAlias www.pbx.domain.eu pbx.domain.eu

    ServerAdmin webmaster@domain.eu

    DocumentRoot /home/martin/domains/domain.eu/private_html/manage

       ProxyPass / http://sip.domain.eu:8000/

       ProxyPassReverse / http://sip.domain.eu:8000/

    UseCanonicalName OFF

    <IfModule !mod_ruid2.c>

        SuexecUserGroup martin martin

    </IfModule>

    CustomLog /var/log/httpd/domains/domain.eu.pbx.bytes bytes

    CustomLog /var/log/httpd/domains/domain.eu.pbx.log combined

    ErrorLog /var/log/httpd/domains/domain.eu.pbx.error.log

    <Directory /home/martin/domains/domain.eu/private_html>

        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None

        Options -ExecCGI -Includes +IncludesNOEXEC

        <FilesMatch "\.(inc|php|phtml|phps|php73)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73

            </If>

        </FilesMatch>

    </Directory>

</VirtualHost>

    ServerName www.domain.eu

    ServerAlias www.domain.eu domain.eu

    ServerAdmin webmaster@domain.eu

    DocumentRoot /home/martin/domains/domain.eu/public_html

    UseCanonicalName OFF

    SetEnvIf X-Forwarded-Proto "https" HTTPS=on

    RewriteEngine On

    RewriteCond %{HTTPS} !=on

    RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]

    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    <IfModule !mod_ruid2.c>

        SuexecUserGroup martin martin

    </IfModule>

    CustomLog /var/log/httpd/domains/domain.eu.bytes bytes

    CustomLog /var/log/httpd/domains/domain.eu.log combined

    ErrorLog /var/log/httpd/domains/domain.eu.error.log

    <Directory /home/martin/domains/domain.eu/public_html>

        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None

        Options -ExecCGI -Includes +IncludesNOEXEC

        <FilesMatch "\.(inc|php|phtml|phps|php73)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73

            </If>

        </FilesMatch>

    </Directory>

</VirtualHost>



<VirtualHost 209.250.241.172:8081 127.0.0.1:8081 >

<VirtualHost 209.250.241.172:443 >

    SSLEngine on

    SSLCertificateFile /usr/local/directadmin/data/users/martin/domains/domain.eu.cert.combined

    SSLCertificateKeyFile /usr/local/directadmin/data/users/martin/domains/domain.eu.key

    SSLCACertificateFile /usr/local/directadmin/data/users/martin/domains/domain.eu.cacert 

    ServerName www.pbx.domain.eu

    ServerAlias www.pbx.domain.eu pbx.domain.eu

    ServerAdmin webmaster@domain.eu

    DocumentRoot /home/martin/domains/domain.eu/private_html/manage

       ProxyPass / http://sip.domain.eu:8000/

       ProxyPassReverse / http://sip.domain.eu:8000/

    UseCanonicalName OFF

    <IfModule !mod_ruid2.c>

        SuexecUserGroup martin martin

    </IfModule>

    CustomLog /var/log/httpd/domains/domain.eu.pbx.bytes bytes

    CustomLog /var/log/httpd/domains/domain.eu.pbx.log combined

    ErrorLog /var/log/httpd/domains/domain.eu.pbx.error.log

    <Directory /home/martin/domains/domain.eu/private_html>

        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None

        Options -ExecCGI -Includes +IncludesNOEXEC

        <FilesMatch "\.(inc|php|phtml|phps|php73)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73

            </If>

        </FilesMatch>

    </Directory>

</VirtualHost>

    SSLEngine on

    SSLCertificateFile /usr/local/directadmin/data/users/martin/domains/domain.eu.cert.combined

    SSLCertificateKeyFile /usr/local/directadmin/data/users/martin/domains/domain.eu.key

    SSLCACertificateFile /usr/local/directadmin/data/users/martin/domains/domain.eu.cacert

    ServerName www.domain.eu

    ServerAlias www.domain.eu domain.eu

    ServerAdmin webmaster@domain.eu

    DocumentRoot /home/martin/domains/domain.eu/private_html

    UseCanonicalName OFF

    <IfModule !mod_ruid2.c>

        SuexecUserGroup martin martin

    </IfModule>

    CustomLog /var/log/httpd/domains/domain.eu.bytes bytes

    CustomLog /var/log/httpd/domains/domain.eu.log combined

    ErrorLog /var/log/httpd/domains/domain.eu.error.log

    <Directory /home/martin/domains/domain.eu/private_html>

        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None

        Options -ExecCGI -Includes +IncludesNOEXEC

        <FilesMatch "\.(inc|php|phtml|phps|php73)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73

            </If>

        </FilesMatch>

    </Directory>

</VirtualHost>



<VirtualHost 209.250.241.172:8080 127.0.0.1:8080 >

    ServerName www.clients.telecomhippie.eu

    ServerAlias www.clients.telecomhippie.eu clients.telecomhippie.eu

    ServerAdmin webmaster@clients.telecomhippie.eu

    DocumentRoot /home/martin/domains/clients.telecomhippie.eu/public_html

    UseCanonicalName OFF

    SetEnvIf X-Forwarded-Proto "https" HTTPS=on

    RewriteEngine On

    RewriteCond %{HTTPS} !=on

    RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]

    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    <IfModule !mod_ruid2.c>

        SuexecUserGroup martin martin

    </IfModule>

    CustomLog /var/log/httpd/domains/clients.telecomhippie.eu.bytes bytes

    CustomLog /var/log/httpd/domains/clients.telecomhippie.eu.log combined

    ErrorLog /var/log/httpd/domains/clients.telecomhippie.eu.error.log

    <Directory /home/martin/domains/clients.telecomhippie.eu/public_html>

        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None

        Options -ExecCGI -Includes +IncludesNOEXEC

        <FilesMatch "\.(inc|php|phtml|phps|php73)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73

            </If>

        </FilesMatch>

    </Directory>

</VirtualHost>



<VirtualHost 209.250.241.172:8081 127.0.0.1:8081 >

    SSLEngine on

    SSLCertificateFile /usr/local/directadmin/data/users/martin/domains/clients.telecomhippie.eu.cert

    SSLCertificateKeyFile /usr/local/directadmin/data/users/martin/domains/clients.telecomhippie.eu.key

    SSLCACertificateFile /usr/local/directadmin/data/users/martin/domains/clients.telecomhippie.eu.cacert

    ServerName www.clients.telecomhippie.eu

    ServerAlias www.clients.telecomhippie.eu clients.telecomhippie.eu

    ServerAdmin webmaster@clients.telecomhippie.eu

    DocumentRoot /home/martin/domains/clients.telecomhippie.eu/private_html

    UseCanonicalName OFF

    <IfModule !mod_ruid2.c>

        SuexecUserGroup martin martin

    </IfModule>

    CustomLog /var/log/httpd/domains/clients.telecomhippie.eu.bytes bytes

    CustomLog /var/log/httpd/domains/clients.telecomhippie.eu.log combined

    ErrorLog /var/log/httpd/domains/clients.telecomhippie.eu.error.log

    <Directory /home/martin/domains/clients.telecomhippie.eu/private_html>

        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None

        Options -ExecCGI -Includes +IncludesNOEXEC

        <FilesMatch "\.(inc|php|phtml|phps|php73)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73

            </If>

        </FilesMatch>

    </Directory>

</VirtualHost>



<VirtualHost 209.250.241.172:8080 127.0.0.1:8080 >

    ServerName www.selfservice.domain.eu

    ServerAlias www.selfservice.domain.eu selfservice.domain.eu

    ServerAdmin webmaster@selfservice.domain.eu

    DocumentRoot /home/martin/domains/selfservice.domain.eu/public_html

    UseCanonicalName OFF

    <IfModule !mod_ruid2.c>

        SuexecUserGroup martin martin

    </IfModule>

    CustomLog /var/log/httpd/domains/selfservice.domain.eu.bytes bytes

    CustomLog /var/log/httpd/domains/selfservice.domain.eu.log combined

    ErrorLog /var/log/httpd/domains/selfservice.domain.eu.error.log

    <Directory /home/martin/domains/selfservice.domain.eu/public_html>

        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None

        Options -ExecCGI -Includes +IncludesNOEXEC

        <FilesMatch "\.(inc|php|phtml|phps|php73)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73

            </If>

        </FilesMatch>

    </Directory>

</VirtualHost>




yes after rebuild its there
 
Last edited:

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
HTML:
[root@webserver custombuild]# cat /usr/local/directadmin/data/templates/virtual*.conf

|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|

|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|

<VirtualHost |IP|:|PORT_80| |MULTI_IP|>

|CUSTOM|

|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|

    ServerName www.|DOMAIN|

    ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|

    ServerAdmin |ADMIN|

    DocumentRoot |DOCROOT|

    |CGI|



    |USECANONICALNAME|



    User |USER|

    Group |GROUP|

    CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes

    CustomLog /var/log/httpd/domains/|DOMAIN|.log combined

    ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log



    |*if SUSPENDED_REASON|

    <IfModule mod_env.c>

        SetEnv reason |SUSPENDED_REASON|

    </IfModule>

    |*endif|



    <Directory |DOCROOT|>

        Options +Includes -Indexes

|*if HAVE_SAFE_MODE="1"|

        php_admin_flag safe_mode |SAFE_MODE|

|*endif|

|*if CLI="1"|

        php_admin_flag engine |PHP|

        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|'

|*endif|

|*if OPEN_BASEDIR="ON"|

        php_admin_value open_basedir |OPEN_BASEDIR_PATH|

|*endif|

|*if SUPHP="1"|

        suPHP_Engine |PHP|

        suPHP_UserGroup |USER| |GROUP|

|*endif|

    </Directory>

|HANDLERS|

|MIMETYPES|



</VirtualHost>

|CUSTOM1|

|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|

|?REALDOCROOT=`HOME`/domains/`DOMAIN`/public_html|



|?HOST_DOMAIN=`DOMAIN`|

|*if HOST_POINTER|

|?HOST_DOMAIN=`HOST_POINTER`|

|*endif|



|?OBDP1=|

|*if PHP1_RELEASE!="0"|

|?OBDP1=:/usr/local/php`PHP1_RELEASE`/lib/php/|

|*endif|

|?OBDP2=|

|*if PHP2_RELEASE!="0"|

|?OBDP2=:/usr/local/php`PHP2_RELEASE`/lib/php/|

|*endif|



|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/opt/alt/php`PHP1_RELEASE`/usr/share/pear/:/dev/urandom:/usr/local/lib/php/`OBDP1``OBDP2`|



|?FASTCGI_OPENBASEDIR=|

|*if OPEN_BASEDIR_ENABLED="ON"|

|?FASTCGI_OPENBASEDIR=-d open_basedir="`OPEN_BASEDIR_PATH`"|

|*endif|



|?PHP_MAIL_LOG=|

|?CLI_PHP_MAIL_LOG=|

|*if PHP_MAIL_LOG_ENABLED="1"|

|?PHP_MAIL_LOG=-d mail.log="`HOME`/.php/php-mail.log"|

|?CLI_PHP_MAIL_LOG=php_admin_value mail.log `HOME`/.php/php-mail.log|

|*endif|



|?PHP_EMAIL=`USER`@`DOMAIN`|

|?FASTCGI_SENDMAIL_FROM=-d sendmail_from="`PHP_EMAIL`"|



|?ALLOW_OVERRIDE=AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None|

|?COMBINED_LOG=combined|



<VirtualHost |IP|:|PORT_80| |MULTI_IP|>

|CUSTOM|

|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/cgi-bin/|

    ServerName www.|HOST_DOMAIN|

    ServerAlias www.|HOST_DOMAIN| |HOST_DOMAIN| |SERVER_ALIASES|

    ServerAdmin |ADMIN|

    DocumentRoot |DOCROOT|

    |CGI|



    |USECANONICALNAME|



    |FORCE_SSL_REDIRECT|

  

    <IfModule !mod_ruid2.c>

        SuexecUserGroup |USER| |GROUP|

    </IfModule>

    |*if HAVE_RUID2="1"|

    <IfModule mod_ruid2.c>

        RMode config

        RUidGid |USER| |GROUP|

        #RGroups apache |SECURE_ACCESS_GROUP|

        RGroups @none

    </IfModule>

    |*endif|

    |*if RUID2_AND_MOD_SECURITY="1"|

    <IfModule mod_security2.c>

        SecAuditLogStorageDir |MODSEC_AUDIT_DIR|/|USER|

    </IfModule>

    |*endif|



    CustomLog |APACHELOGDIR|/|DOMAIN|.bytes bytes

    CustomLog |APACHELOGDIR|/|DOMAIN|.log |COMBINED_LOG|

    ErrorLog |APACHELOGDIR|/|DOMAIN|.error.log



    |*if SUSPENDED_REASON|

    <IfModule mod_env.c>

        SetEnv reason |SUSPENDED_REASON|

    </IfModule>

    |*endif|



|*if HAVE_PHP1_FPM_OLD="1"|

    #Make sure you're running Apache 2.4.10 or newer.

|*endif|



|*if HAVE_PHP2_FPM_OLD="1"|

    #Make sure you're running Apache 2.4.10 or newer.

|*endif|

|CUSTOM2|

    <Directory |DOCROOT|>

|CUSTOM3|

|*if CGI=""|

        |ALLOW_OVERRIDE|

        Options -ExecCGI -Includes +IncludesNOEXEC

|*endif|

|*if HAVE_PHP1_FPM="1"|

        <FilesMatch "\.(inc|php|phtml|phps|php|PHP1_RELEASE|)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php|PHP1_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .inc .php .phtml .php|PHP1_RELEASE|

            </If>

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_FPM="1"|

        <FilesMatch "\.(inc|php|phtml|phps|php|PHP2_RELEASE|)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php|PHP2_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .php|PHP2_RELEASE|

            </If>

        </FilesMatch>

|*endif|



|*if HAVE_PHP1_FCGI="1"|

        <IfModule mod_fcgid.c>

            FCGIWrapper '/usr/local/safe-bin/fcgid|PHP1_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini |FASTCGI_SENDMAIL_FROM| |FASTCGI_OPENBASEDIR| |PHP_MAIL_LOG|' .php

            <FilesMatch "\.php$">

                SetHandler fcgid-script

                Options +ExecCGI

            </FilesMatch>

        </IfModule>

|*endif|

|*if HAVE_PHP2_FCGI="1"|

        <IfModule mod_fcgid.c>

            FCGIWrapper '/usr/local/safe-bin/fcgid|PHP2_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini |FASTCGI_SENDMAIL_FROM| |FASTCGI_OPENBASEDIR| |PHP_MAIL_LOG|' .php|PHP2_RELEASE|

            <FilesMatch "\.php|PHP2_RELEASE|$">

                SetHandler fcgid-script

                Options +ExecCGI

            </FilesMatch>

        </IfModule>

|*endif|

|IF_MODULE_LITESPEED_OPEN|

|*if HAVE_SAFE_MODE="1"|

        php_admin_flag safe_mode |SAFE_MODE|

|*endif|

|*if CLI="1"|

        php_admin_flag engine |PHP|

        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |PHP_EMAIL|'

        |CLI_PHP_MAIL_LOG|

|*endif|

|*if OPEN_BASEDIR="ON"|

        php_admin_value open_basedir |OPEN_BASEDIR_PATH|

|*endif|

|IF_MODULE_LITESPEED_CLOSE|

|*if HAVE_PHP1_CLI="1"|

        <FilesMatch "\.php$">

            AddHandler application/x-httpd-php|LSPHP1_RELEASE| .php

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_CLI="1"|

        <FilesMatch "\.php|PHP2_RELEASE|$">

            AddHandler application/x-httpd-php|LSPHP2_RELEASE| .php|PHP2_RELEASE|

        </FilesMatch>

|*endif|

|*if SUPHP="1"|

        suPHP_Engine |PHP|

        suPHP_UserGroup |USER| |GROUP|

|*endif|

|*if HAVE_PHP1_SUPHP="1"|

        <FilesMatch "\.php$">

            AddHandler x-httpd-php|PHP1_RELEASE| .php

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_SUPHP="1"|

        <FilesMatch \.php|PHP2_RELEASE|$>

            AddHandler x-httpd-php|PHP2_RELEASE| .php|PHP2_RELEASE|

        </FilesMatch>

|*endif|

|*if PHP="OFF"|

        #PHP is OFF for this domain

|*endif|

    </Directory>



|*if USE_HOSTNAME_FOR_ALIAS="1"|

      RewriteEngine on

      RewriteOptions inherit

|*endif|



|HANDLERS|

|MIMETYPES|

|CUSTOM4|

</VirtualHost>

|CUSTOM1|

|?CGI=ScriptAlias /cgi-bin/ `HOME`/domains/`DOMAIN`/public_html/cgi-bin/|

|?DOCROOT=`HOME`/domains/`DOMAIN`/private_html|

|?REALDOCROOT=`HOME`/domains/`DOMAIN`/private_html|



|?HOST_DOMAIN=`DOMAIN`|

|*if HOST_POINTER|

|?HOST_DOMAIN=`HOST_POINTER`|

|*endif|



|?OBDP1=|

|*if PHP1_RELEASE!="0"|

|?OBDP1=:/usr/local/php`PHP1_RELEASE`/lib/php/|

|*endif|

|?OBDP2=|

|*if PHP2_RELEASE!="0"|

|?OBDP2=:/usr/local/php`PHP2_RELEASE`/lib/php/|

|*endif|



|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/opt/alt/php`PHP1_RELEASE`/usr/share/pear/:/dev/urandom:/usr/local/lib/php/`OBDP1``OBDP2`|



|?FASTCGI_OPENBASEDIR=|

|*if OPEN_BASEDIR_ENABLED="ON"|

|?FASTCGI_OPENBASEDIR=-d open_basedir="`OPEN_BASEDIR_PATH`"|

|*endif|



|?PHP_MAIL_LOG=|

|?CLI_PHP_MAIL_LOG=|

|*if PHP_MAIL_LOG_ENABLED="1"|

|?PHP_MAIL_LOG=-d mail.log="`HOME`/.php/php-mail.log"|

|?CLI_PHP_MAIL_LOG=php_admin_value mail.log `HOME`/.php/php-mail.log|

|*endif|



|?PHP_EMAIL=`USER`@`DOMAIN`|

|?FASTCGI_SENDMAIL_FROM=-d sendmail_from="`PHP_EMAIL`"|



|?ALLOW_OVERRIDE=AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None|

|?COMBINED_LOG=combined|



<VirtualHost |IP|:|PORT_443| |MULTI_IP|>

|CUSTOM|

    SSLEngine on

    SSLCertificateFile |CERT|

    SSLCertificateKeyFile |KEY|

    |CAROOT|



    ServerName www.|HOST_DOMAIN|

    ServerAlias www.|HOST_DOMAIN| |HOST_DOMAIN| |SERVER_ALIASES|

    ServerAdmin |ADMIN|

    DocumentRoot |DOCROOT|

    |CGI|



    |USECANONICALNAME|



    |FORCE_SSL_REDIRECT|



    <IfModule !mod_ruid2.c>

        SuexecUserGroup |USER| |GROUP|

    </IfModule>

    |*if HAVE_RUID2="1"|

    <IfModule mod_ruid2.c>

        RMode config

        RUidGid |USER| |GROUP|

        #RGroups apache |SECURE_ACCESS_GROUP|

        RGroups @none

    </IfModule>

    |*endif|

    |*if RUID2_AND_MOD_SECURITY="1"|

    <IfModule mod_security2.c>

        SecAuditLogStorageDir |MODSEC_AUDIT_DIR|/|USER|

    </IfModule>

    |*endif|



    CustomLog |APACHELOGDIR|/|DOMAIN|.bytes bytes

    CustomLog |APACHELOGDIR|/|DOMAIN|.log |COMBINED_LOG|

    ErrorLog |APACHELOGDIR|/|DOMAIN|.error.log



    |*if SUSPENDED_REASON|

    <IfModule mod_env.c>

        SetEnv reason |SUSPENDED_REASON|

    </IfModule>

    |*endif|



|*if HAVE_PHP1_FPM_OLD="1"|

    #Make sure you're running Apache 2.4.10 or newer.

|*endif|



|*if HAVE_PHP2_FPM_OLD="1"|

    #Make sure you're running Apache 2.4.10 or newer.

|*endif|

|CUSTOM2|

    <Directory |DOCROOT|>

|CUSTOM3|

|*if CGI=""|

        |ALLOW_OVERRIDE|

        Options -ExecCGI -Includes +IncludesNOEXEC

|*endif|

|*if HAVE_PHP1_FPM="1"|

        <FilesMatch "\.(inc|php|phtml|phps|php|PHP1_RELEASE|)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php|PHP1_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .inc .php .phtml .php|PHP1_RELEASE|

            </If>

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_FPM="1"|

        <FilesMatch "\.(inc|php|phtml|phps|php|PHP2_RELEASE|)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php|PHP2_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .php|PHP2_RELEASE|

            </If>

        </FilesMatch>

|*endif|





|*if HAVE_PHP1_FCGI="1"|

        <IfModule mod_fcgid.c>

            FCGIWrapper '/usr/local/safe-bin/fcgid|PHP1_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini |FASTCGI_SENDMAIL_FROM| |FASTCGI_OPENBASEDIR| |PHP_MAIL_LOG|' .php

            <FilesMatch "\.php$">

                SetHandler fcgid-script

                Options +ExecCGI

            </FilesMatch>

        </IfModule>

|*endif|

|*if HAVE_PHP2_FCGI="1"|

        <IfModule mod_fcgid.c>

            FCGIWrapper '/usr/local/safe-bin/fcgid|PHP2_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini |FASTCGI_SENDMAIL_FROM| |FASTCGI_OPENBASEDIR| |PHP_MAIL_LOG|' .php|PHP2_RELEASE|

            <FilesMatch "\.php|PHP2_RELEASE|$">

                SetHandler fcgid-script

                Options +ExecCGI

            </FilesMatch>

        </IfModule>

|*endif|

|IF_MODULE_LITESPEED_OPEN|

|*if HAVE_SAFE_MODE="1"|

        php_admin_flag safe_mode |SAFE_MODE|

|*endif|

|*if CLI="1"|

        php_admin_flag engine |PHP|

        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |PHP_EMAIL|'

        |CLI_PHP_MAIL_LOG|

|*endif|

|*if OPEN_BASEDIR="ON"|

        php_admin_value open_basedir |OPEN_BASEDIR_PATH|

|*endif|

|IF_MODULE_LITESPEED_CLOSE|

|*if HAVE_PHP1_CLI="1"|

        <FilesMatch "\.php$">

            AddHandler application/x-httpd-php|LSPHP1_RELEASE| .php

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_CLI="1"|

        <FilesMatch "\.php|PHP2_RELEASE|$">

            AddHandler application/x-httpd-php|LSPHP2_RELEASE| .php|PHP2_RELEASE|

        </FilesMatch>

|*endif|

|*if SUPHP="1"|

        suPHP_Engine |PHP|

        suPHP_UserGroup |USER| |GROUP|

|*endif|

|*if HAVE_PHP1_SUPHP="1"|

        <FilesMatch "\.php$">

            AddHandler x-httpd-php|PHP1_RELEASE| .php

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_SUPHP="1"|

        <FilesMatch \.php|PHP2_RELEASE|$>

            AddHandler x-httpd-php|PHP2_RELEASE| .php|PHP2_RELEASE|

        </FilesMatch>

|*endif|

|*if PHP="OFF"|

        #PHP is OFF for this domain

|*endif|

    </Directory>



|*if USE_HOSTNAME_FOR_ALIAS="1"|

      RewriteEngine on

      RewriteOptions inherit

|*endif|



|HANDLERS|

|MIMETYPES|

|CUSTOM4|

</VirtualHost>

|CUSTOM1|

|?DOCROOT=`HOME`/domains/`DOMAIN`/private_html|

|?REALDOCROOT=`HOME`/domains/`DOMAIN`/private_html|



|?HOST_DOMAIN=`DOMAIN`|

|*if HOST_POINTER|

|?HOST_DOMAIN=`HOST_POINTER`|

|*endif|



|?OBDP1=|

|*if PHP1_RELEASE!="0"|

|?OBDP1=:/usr/local/php`PHP1_RELEASE`/lib/php/|

|*endif|

|?OBDP2=|

|*if PHP2_RELEASE!="0"|

|?OBDP2=:/usr/local/php`PHP2_RELEASE`/lib/php/|

|*endif|



|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/opt/alt/php`PHP1_RELEASE`/usr/share/pear/:/dev/urandom:/usr/local/lib/php/`OBDP1``OBDP2`|



|?FASTCGI_OPENBASEDIR=|

|*if OPEN_BASEDIR_ENABLED="ON"|

|?FASTCGI_OPENBASEDIR=-d open_basedir="`OPEN_BASEDIR_PATH`"|

|*endif|



|?PHP_MAIL_LOG=|

|?CLI_PHP_MAIL_LOG=|

|*if PHP_MAIL_LOG_ENABLED="1"|

|?PHP_MAIL_LOG=-d mail.log="`HOME`/.php/php-mail.log"|

|?CLI_PHP_MAIL_LOG=php_admin_value mail.log `HOME`/.php/php-mail.log|

|*endif|



|?PHP_EMAIL=`USER`@`DOMAIN`|

|?FASTCGI_SENDMAIL_FROM=-d sendmail_from="`PHP_EMAIL`"|



|?ALLOW_OVERRIDE=AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None|

|?COMBINED_LOG=combined|



<VirtualHost |IP|:|PORT_443| |MULTI_IP|>

|CUSTOM|

|?SDOCROOT=`DOCROOT`/`SUB`|

|?CGI=ScriptAlias /cgi-bin/ `SDOCROOT`/cgi-bin/|

    SSLEngine on

    SSLCertificateFile |CERT|

    SSLCertificateKeyFile |KEY|

    |CAROOT|   



    ServerName www.|SUB|.|HOST_DOMAIN|

    ServerAlias www.|SUB|.|HOST_DOMAIN| |SUB|.|HOST_DOMAIN| |SERVER_ALIASES|

    ServerAdmin |ADMIN|

    DocumentRoot |SDOCROOT|

    |CGI|



    |USECANONICALNAME|



    |FORCE_SSL_REDIRECT|



    <IfModule !mod_ruid2.c>

        SuexecUserGroup |USER| |GROUP|

    </IfModule>

    |*if HAVE_RUID2="1"|

    <IfModule mod_ruid2.c>

        RMode config

        RUidGid |USER| |GROUP|

        #RGroups apache |SECURE_ACCESS_GROUP|

        RGroups @none

    </IfModule>

    |*endif|

    |*if RUID2_AND_MOD_SECURITY="1"|

    <IfModule mod_security2.c>

        SecAuditLogStorageDir |MODSEC_AUDIT_DIR|/|USER|

    </IfModule>

    |*endif|



    CustomLog |APACHELOGDIR|/|DOMAIN|.|SUB|.bytes bytes

    CustomLog |APACHELOGDIR|/|DOMAIN|.|SUB|.log |COMBINED_LOG|

    ErrorLog |APACHELOGDIR|/|DOMAIN|.|SUB|.error.log



    |*if SUSPENDED_REASON|

    <IfModule mod_env.c>

        SetEnv reason |SUSPENDED_REASON|

    </IfModule>

    |*endif|



|*if HAVE_PHP1_FPM_OLD="1"|

    #Make sure you're running Apache 2.4.10 or newer.

|*endif|



|*if HAVE_PHP2_FPM_OLD="1"|

    #Make sure you're running Apache 2.4.10 or newer.

|*endif|

|CUSTOM2|

    <Directory |DOCROOT|>

|CUSTOM3|

|*if CGI=""|

        |ALLOW_OVERRIDE|

        Options -ExecCGI -Includes +IncludesNOEXEC

|*endif|

|*if HAVE_PHP1_FPM="1"|

        <FilesMatch "\.(inc|php|phtml|phps|php|PHP1_RELEASE|)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php|PHP1_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .inc .php .phtml .php|PHP1_RELEASE|

            </If>

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_FPM="1"|

        <FilesMatch "\.(inc|php|phtml|phps|php|PHP2_RELEASE|)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php|PHP2_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .php|PHP2_RELEASE|

            </If>

        </FilesMatch>

|*endif|



|*if HAVE_PHP1_FCGI="1"|

        <IfModule mod_fcgid.c>

            FCGIWrapper '/usr/local/safe-bin/fcgid|PHP1_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini |FASTCGI_SENDMAIL_FROM| |FASTCGI_OPENBASEDIR| |PHP_MAIL_LOG|' .php

            <FilesMatch "\.php$">

                SetHandler fcgid-script

                Options +ExecCGI

            </FilesMatch>

        </IfModule>

|*endif|

|*if HAVE_PHP2_FCGI="1"|

        <IfModule mod_fcgid.c>

            FCGIWrapper '/usr/local/safe-bin/fcgid|PHP2_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini |FASTCGI_SENDMAIL_FROM| |FASTCGI_OPENBASEDIR| |PHP_MAIL_LOG|' .php|PHP2_RELEASE|

            <FilesMatch "\.php|PHP2_RELEASE|$">

                SetHandler fcgid-script

                Options +ExecCGI

            </FilesMatch>

        </IfModule>

|*endif|

|IF_MODULE_LITESPEED_OPEN|

|*if HAVE_SAFE_MODE="1"|

        php_admin_flag safe_mode |SAFE_MODE|

|*endif|

|*if CLI="1"|

        php_admin_flag engine |PHP|

        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |PHP_EMAIL|'

        |CLI_PHP_MAIL_LOG|

|*endif|

|*if OPEN_BASEDIR="ON"|

        php_admin_value open_basedir |OPEN_BASEDIR_PATH|

|*endif|

|IF_MODULE_LITESPEED_CLOSE|

|*if HAVE_PHP1_CLI="1"|

        <FilesMatch "\.php$">

            AddHandler application/x-httpd-php|LSPHP1_RELEASE| .php

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_CLI="1"|

        <FilesMatch "\.php|PHP2_RELEASE|$">

            AddHandler application/x-httpd-php|LSPHP2_RELEASE| .php|PHP2_RELEASE|

        </FilesMatch>

|*endif|

|*if SUPHP="1"|

        suPHP_Engine |PHP|

        suPHP_UserGroup |USER| |GROUP|

|*endif|

|*if HAVE_PHP1_SUPHP="1"|

        <FilesMatch "\.php$">

            AddHandler x-httpd-php|PHP1_RELEASE| .php

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_SUPHP="1"|

        <FilesMatch \.php|PHP2_RELEASE|$>

            AddHandler x-httpd-php|PHP2_RELEASE| .php|PHP2_RELEASE|

        </FilesMatch>

|*endif|

    </Directory>



|*if USE_HOSTNAME_FOR_ALIAS="1"|

      RewriteEngine on

      RewriteOptions inherit

|*endif|



|HANDLERS|

|MIMETYPES|

|CUSTOM4|

</VirtualHost>



|CUSTOM1|

|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|

|?REALDOCROOT=`HOME`/domains/`DOMAIN`/public_html|



|?HOST_DOMAIN=`DOMAIN`|

|*if HOST_POINTER|

|?HOST_DOMAIN=`HOST_POINTER`|

|*endif|



|?OBDP1=|

|*if PHP1_RELEASE!="0"|

|?OBDP1=:/usr/local/php`PHP1_RELEASE`/lib/php/|

|*endif|

|?OBDP2=|

|*if PHP2_RELEASE!="0"|

|?OBDP2=:/usr/local/php`PHP2_RELEASE`/lib/php/|

|*endif|



|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/opt/alt/php`PHP1_RELEASE`/usr/share/pear/:/dev/urandom:/usr/local/lib/php/`OBDP1``OBDP2`|



|?FASTCGI_OPENBASEDIR=|

|*if OPEN_BASEDIR_ENABLED="ON"|

|?FASTCGI_OPENBASEDIR=-d open_basedir="`OPEN_BASEDIR_PATH`"|

|*endif|



|?PHP_MAIL_LOG=|

|?CLI_PHP_MAIL_LOG=|

|*if PHP_MAIL_LOG_ENABLED="1"|

|?PHP_MAIL_LOG=-d mail.log="`HOME`/.php/php-mail.log"|

|?CLI_PHP_MAIL_LOG=php_admin_value mail.log `HOME`/.php/php-mail.log|

|*endif|



|?PHP_EMAIL=`USER`@`DOMAIN`|

|?FASTCGI_SENDMAIL_FROM=-d sendmail_from="`PHP_EMAIL`"|



|?ALLOW_OVERRIDE=AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None|

|?COMBINED_LOG=combined|



<VirtualHost |IP|:|PORT_80| |MULTI_IP|>

|CUSTOM|

|?SDOCROOT=`DOCROOT`/`SUB`|

|?CGI=ScriptAlias /cgi-bin/ `SDOCROOT`/cgi-bin/|

    ServerName www.|SUB|.|HOST_DOMAIN|

    ServerAlias www.|SUB|.|HOST_DOMAIN| |SUB|.|HOST_DOMAIN| |SERVER_ALIASES|

    ServerAdmin |ADMIN|

    DocumentRoot |SDOCROOT|

    |CGI|



    |USECANONICALNAME|



    |FORCE_SSL_REDIRECT|



    <IfModule !mod_ruid2.c>

        SuexecUserGroup |USER| |GROUP|

    </IfModule>

    |*if HAVE_RUID2="1"|

    <IfModule mod_ruid2.c>

        RMode config

        RUidGid |USER| |GROUP|

        #RGroups apache |SECURE_ACCESS_GROUP|

        RGroups @none

    </IfModule>

    |*endif|

    |*if RUID2_AND_MOD_SECURITY="1"|

    <IfModule mod_security2.c>

        SecAuditLogStorageDir |MODSEC_AUDIT_DIR|/|USER|

    </IfModule>

    |*endif|



    CustomLog |APACHELOGDIR|/|DOMAIN|.|SUB|.bytes bytes

    CustomLog |APACHELOGDIR|/|DOMAIN|.|SUB|.log |COMBINED_LOG|

    ErrorLog |APACHELOGDIR|/|DOMAIN|.|SUB|.error.log



    |*if SUSPENDED_REASON|

    <IfModule mod_env.c>

        SetEnv reason |SUSPENDED_REASON|

    </IfModule>

    |*endif|



|*if HAVE_PHP1_FPM_OLD="1"|

    #Make sure you're running Apache 2.4.10 or newer.

|*endif|



|*if HAVE_PHP2_FPM_OLD="1"|

    #Make sure you're running Apache 2.4.10 or newer.

|*endif|

|CUSTOM2|

    <Directory |DOCROOT|>

|CUSTOM3|

|*if CGI=""|

        |ALLOW_OVERRIDE|

        Options -ExecCGI -Includes +IncludesNOEXEC

|*endif|

|*if HAVE_PHP1_FPM="1"|

        <FilesMatch "\.(inc|php|phtml|phps|php|PHP1_RELEASE|)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php|PHP1_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .inc .php .phtml .php|PHP1_RELEASE|

            </If>

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_FPM="1"|

        <FilesMatch "\.(inc|php|phtml|phps|php|PHP2_RELEASE|)$">

            <If "-f %{REQUEST_FILENAME}">

                #ProxyErrorOverride on

                AddHandler "proxy:unix:/usr/local/php|PHP2_RELEASE|/sockets/|USER|.sock|fcgi://localhost" .php|PHP2_RELEASE|

            </If>

        </FilesMatch>

|*endif|



|*if HAVE_PHP1_FCGI="1"|

        <IfModule mod_fcgid.c>

            FCGIWrapper '/usr/local/safe-bin/fcgid|PHP1_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini |FASTCGI_SENDMAIL_FROM| |FASTCGI_OPENBASEDIR| |PHP_MAIL_LOG|' .php

            <FilesMatch "\.php$">

                SetHandler fcgid-script

                Options +ExecCGI

            </FilesMatch>

        </IfModule>

|*endif|

|*if HAVE_PHP2_FCGI="1"|

        <IfModule mod_fcgid.c>

            FCGIWrapper '/usr/local/safe-bin/fcgid|PHP2_RELEASE|.sh /usr/local/directadmin/data/users/|USER|/php/|DOMAIN|.ini |FASTCGI_SENDMAIL_FROM| |FASTCGI_OPENBASEDIR| |PHP_MAIL_LOG|' .php|PHP2_RELEASE|

            <FilesMatch "\.php|PHP2_RELEASE|$">

                SetHandler fcgid-script

                Options +ExecCGI

            </FilesMatch>

        </IfModule>

|*endif|

|IF_MODULE_LITESPEED_OPEN|

|*if HAVE_SAFE_MODE="1"|

        php_admin_flag safe_mode |SAFE_MODE|

|*endif|

|*if CLI="1"|

        php_admin_flag engine |PHP|

        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |PHP_EMAIL|'

        |CLI_PHP_MAIL_LOG|

|*endif|

|*if OPEN_BASEDIR="ON"|

        php_admin_value open_basedir |OPEN_BASEDIR_PATH|

|*endif|

|IF_MODULE_LITESPEED_CLOSE|

|*if HAVE_PHP1_CLI="1"|

        <FilesMatch "\.php$">

            AddHandler application/x-httpd-php|LSPHP1_RELEASE| .php

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_CLI="1"|

        <FilesMatch "\.php|PHP2_RELEASE|$">

            AddHandler application/x-httpd-php|LSPHP2_RELEASE| .php|PHP2_RELEASE|

        </FilesMatch>

|*endif|

|*if SUPHP="1"|

        suPHP_Engine |PHP|

        suPHP_UserGroup |USER| |GROUP|

|*endif|

|*if HAVE_PHP1_SUPHP="1"|

        <FilesMatch "\.php$">

            AddHandler x-httpd-php|PHP1_RELEASE| .php

        </FilesMatch>

|*endif|

|*if HAVE_PHP2_SUPHP="1"|

        <FilesMatch \.php|PHP2_RELEASE|$>

            AddHandler x-httpd-php|PHP2_RELEASE| .php|PHP2_RELEASE|

        </FilesMatch>

|*endif|



    </Directory>



|*if USE_HOSTNAME_FOR_ALIAS="1"|

      RewriteEngine on

      RewriteOptions inherit

|*endif|



|HANDLERS|

|MIMETYPES|

|CUSTOM4|

</VirtualHost>

|?CGI=ScriptAlias /cgi-bin/ `HOME`/domains/`DOMAIN`/public_html/cgi-bin/|

|?DOCROOT=`HOME`/domains/`DOMAIN`/private_html|

|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|

<VirtualHost |IP|:|PORT_443| |MULTI_IP|>

|CUSTOM|

    SSLEngine on

    SSLCertificateFile |CERT|

    SSLCertificateKeyFile |KEY|

    |CAROOT|



    ServerName www.|DOMAIN|

    ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|

    ServerAdmin |ADMIN|

    DocumentRoot |DOCROOT|

    |CGI|



    |USECANONICALNAME|



    User |USER|

    Group |GROUP|

    CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes

    CustomLog /var/log/httpd/domains/|DOMAIN|.log combined

    ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log



    |*if SUSPENDED_REASON|

    <IfModule mod_env.c>

        SetEnv reason |SUSPENDED_REASON|

    </IfModule>

    |*endif|



    <Directory |DOCROOT|>

        Options +Includes -Indexes

|*if HAVE_SAFE_MODE="1"|

        php_admin_flag safe_mode |SAFE_MODE|

|*endif|

|*if CLI="1"|

        php_admin_flag engine |PHP|

        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|'

|*endif|

|*if OPEN_BASEDIR="ON"|

        php_admin_value open_basedir |OPEN_BASEDIR_PATH|

|*endif|

|*if SUPHP="1"|

        suPHP_Engine |PHP|

        suPHP_UserGroup |USER| |GROUP|

|*endif|

    </Directory>

|HANDLERS|

|MIMETYPES|



</VirtualHost>

|?CGI=ScriptAlias /cgi-bin/ `HOME`/domains/`DOMAIN`/public_html/`SUB`/cgi-bin/|

|?DOCROOT=`HOME`/domains/`DOMAIN`/private_html|

|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|

<VirtualHost |IP|:|PORT_443| |MULTI_IP|>

|CUSTOM|

    SSLEngine on

    SSLCertificateFile |CERT|

    SSLCertificateKeyFile |KEY|

    |CAROOT|   



    ServerName www.|SUB|.|DOMAIN|

    ServerAlias www.|SUB|.|DOMAIN| |SUB|.|DOMAIN| |SERVER_ALIASES|

    ServerAdmin |ADMIN|

    DocumentRoot |DOCROOT|/|SUB|

    |CGI|



    |USECANONICALNAME|



    User |USER|

    Group |GROUP|

    CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.bytes bytes

    CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined

    ErrorLog /var/log/httpd/domains/|DOMAIN|.|SUB|.error.log



    |*if SUSPENDED_REASON|

    <IfModule mod_env.c>

        SetEnv reason |SUSPENDED_REASON|

    </IfModule>

    |*endif|



    <Directory |DOCROOT|/|SUB|>

        Options +Includes -Indexes

|*if HAVE_SAFE_MODE="1"|

        php_admin_flag safe_mode |SAFE_MODE|

|*endif|

|*if CLI="1"|

        php_admin_flag engine |PHP|

        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|'

|*endif|

|*if OPEN_BASEDIR="ON"|

        php_admin_value open_basedir |OPEN_BASEDIR_PATH|

|*endif|

|*if SUPHP="1"|

                suPHP_Engine |PHP|

        suPHP_UserGroup |USER| |GROUP|

|*endif|

    </Directory>

|HANDLERS|

|MIMETYPES|



</VirtualHost>



|?DOCROOT=`HOME`/domains/`DOMAIN`/public_html|

|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|

<VirtualHost |IP|:|PORT_80| |MULTI_IP|>

|CUSTOM|

|?CGI=ScriptAlias /cgi-bin/ `DOCROOT`/`SUB`/cgi-bin/|

    ServerName www.|SUB|.|DOMAIN|

    ServerAlias www.|SUB|.|DOMAIN| |SUB|.|DOMAIN| |SERVER_ALIASES|

    ServerAdmin |ADMIN|

    DocumentRoot |DOCROOT|/|SUB|

    |CGI|

  

    |USECANONICALNAME|



    User |USER|

    Group |GROUP|

    CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.bytes bytes

    CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined

    ErrorLog /var/log/httpd/domains/|DOMAIN|.|SUB|.error.log



    |*if SUSPENDED_REASON|

    <IfModule mod_env.c>

        SetEnv reason |SUSPENDED_REASON|

    </IfModule>

    |*endif|



    <Directory |DOCROOT|/|SUB|>

        Options +Includes -Indexes

|*if HAVE_SAFE_MODE="1"|

        php_admin_flag safe_mode |SAFE_MODE|

|*endif|

|*if CLI="1"|

        php_admin_flag engine |PHP|

        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|'

|*endif|

|*if OPEN_BASEDIR="ON"|

        php_admin_value open_basedir |OPEN_BASEDIR_PATH|

|*endif|

|*if SUPHP="1"|

        suPHP_Engine |PHP|

        suPHP_UserGroup |USER| |GROUP|

|*endif|

    </Directory>

|HANDLERS|

|MIMETYPES|

  

</VirtualHost>
 
Last edited:

ikkeben

Verified User
Joined
May 22, 2014
Messages
714
Location
Netherlands Germany
Hallo Martin take a look for some custom changed files somewhere or the ones that are included in that file, try forum and docu search.

Also if posting here "code" use the code option please from puldown menu forumeditor this one </>. ;)

Also you did forget to post your versions of software and yes or no CB , which OS, and some more.

I can't help but the tips for posting here are important if you want support from someone i guess.

You did post yourself this, did you have read the links in that part?
Apache config:
# Auto generated apache config file by DirectAdmin version 1.59.5
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to their website

# For global config changes that affect all Users, see this guide:
# http://help.directadmin.com/item.php?id=2
# For local config changes that only affect one User, see this guide:
# http://help.directadmin.com/item.php?id=3
 
Last edited:

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
im sorry, what do you mean with: Hallo Martin take a look for some custom changed files somewhere ?

I mean its clear that there is an error, im not aware of a change i made, but it could be. Im just looking on how to restore it.
Per example how to replace the default confs which i might edited with new ones that are back to default.

I obviously tried searching, i wont ask here if i could find it myself. Its not on the docs or forum, or i suck at searching.

There is the famous rewrite way, but it rewrites from the default templates which i think have that mistake in them, i dont have custom templates.

Thanks for the tip on the code, ill change it
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,911
Location
LT, EU
Please try checking "Custom HTTPd Configuration". The output of these would be enough:
Code:
ls /usr/local/directadmin/data/templates/custom
ls /usr/local/directadmin/data/users/*/domains/*cust_http*
 

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
thanks smtalk

[root@webserver ~]# ls /usr/local/directadmin/data/templates/custom
[root@webserver ~]# ls /usr/local/directadmin/data/users/*/domains/*cust_http*

/usr/local/directadmin/data/users/martin/domains/domain.eu.cust_httpd




Code:
<VirtualHost 209.250.241.172:443 >
    SSLEngine on
    SSLCertificateFile /usr/local/directadmin/data/users/martin/domains/domain.eu.cert.combined
    SSLCertificateKeyFile /usr/local/directadmin/data/users/martin/domains/domain.eu.key
    SSLCACertificateFile /usr/local/directadmin/data/users/martin/domains/domain.eu.cacert   
    ServerName www.pbx.domain.eu
    ServerAlias www.pbx.domain.eu pbx.domain.eu
    ServerAdmin webmaster@domain.eu
    DocumentRoot /home/martin/domains/domain.eu/private_html/manage
       ProxyPass / http://sip.domain.eu:8000/
       ProxyPassReverse / http://sip.domain.eu:8000/
    UseCanonicalName OFF
    <IfModule !mod_ruid2.c>
        SuexecUserGroup martin martin
    </IfModule>
    CustomLog /var/log/httpd/domains/domain.eu.pbx.bytes bytes
    CustomLog /var/log/httpd/domains/domain.eu.pbx.log combined
    ErrorLog /var/log/httpd/domains/domain.eu.pbx.error.log
    <Directory /home/martin/domains/domain.eu/private_html>
        AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
        Options -ExecCGI -Includes +IncludesNOEXEC
        <FilesMatch "\.(inc|php|phtml|phps|php73)$">
            <If "-f %{REQUEST_FILENAME}">
                #ProxyErrorOverride on
                AddHandler "proxy:unix:/usr/local/php73/sockets/martin.sock|fcgi://localhost" .inc .php .phtml .php73
            </If>
        </FilesMatch>
    </Directory>
</VirtualHost>
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
714
Location
Netherlands Germany
I guess think these parts could be wrong there somehow( onderbuikgevoel)

But not sure.
Anyway i could be so wrong with that!

But if such custom things then they are included / activated with the build / rebuild / rewrite / enable / disable modules / restart depending where and which parts those are.

So did you do that again to make the custom undone, after deleting, and do you make backups from all those files before changing / deleting?

If using such customizing one have todo more reading about that. (how custom DA CB parts work)

I am still sometimes confused myself where what.. because by making mistakes with those myself ( hopefully only in the past)

Do some websearch as this example:
https://duckduckgo.com/html then the errors as: ProxyPassReverse <VirtualHost> cannot occur within <VirtualHost>

Or with "directadmin" and in it to "cust_httpd" as ( zoekopdracht)
 
Last edited:

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
I guess think these parts could be wrong there somehow( onderbuikgevoel)

But not sure.


Anyway i could be so wrong with that!

But if such custom things then they are included / activated with the build / rebuild / rewrite / enable / disable modules / restart depending where and which parts those are.

So did you do that again to make the custom undone, after deleting, and do you make backups from all those files before changing / deleting?

If using such customizing one have todo more reading about that. (how custom DA CB parts work)

I am still sometimes confused myself where what.. because by making mistakes with those myself ( hopefully only in the past)
i removed the custom file, and result is the same
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
714
Location
Netherlands Germany
oops too early! after rewrite now its working, now i would love to know whats wrong with my custom file, as it looked good to me

would

ProxyPass / http://sip.domain.eu:8000/
ProxyPassReverse / http://sip.domain.eu:8000/

really create such an error?
Or another syntax wrong in that file , i don't know but you get my point now what i was trying to explain hihi ;)

It could be a not allowed combination ..
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
714
Location
Netherlands Germany
yes yes, but i am surprised that the content would not be checked on save, would save time

the resulting error is also strange
No that is the problem with custom it isn't , and if one forgot about having maybe conflicting parts if something else changed then BAM
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
714
Location
Netherlands Germany
IN post 2 if it is 1:1 .

I see two start

<VirtualHost 209.250.241.172:80 >
<VirtualHost 209.250.241.172:443 >
only one ending / closing

</VirtualHost>
 

martexx

Verified User
Joined
Jul 30, 2006
Messages
136
Location
Texel the Netherlands
No that is the problem with custom it isn't , and if one forgot about having maybe conflicting parts if something else changed then BAM
yes BAM, the error was:
AH00526: Syntax error on line 21 of /usr/local/directadmin/data/users/martin/httpd.conf:
<VirtualHost> cannot occur within <VirtualHost> section

Thats nowhere in that file, even if you remove the whole entry then still that error is strange.
I am not stating that i did everything good, instructions are obsolete and the same as when i started with DA in 2006, but the interface is different.
I just find the error starnge, not that its there, but what it says.

That mostly means that i do not understand, anmd i like to understand. "maybe conflicting parts" is not a solution, but im still thankfull for your reply.

Best wishes to you as well!
 

ikkeben

Verified User
Joined
May 22, 2014
Messages
714
Location
Netherlands Germany
yes, but u dont see them in the custom file do you?
With the rewrite sometime rebuild .. both the custom one ( file) is included in the main , so must be conflicting not 100% right syntax normally then ending in error when it is included. ( which where hmm )


Maybe https://forum.directadmin.com/threads/faq-for-directadmin-new-customers.58062/ then this part

Q: Does DirectAdmin have any templating system for nginx/openlitespeed/apache configuration?
A: Yes, it does. If you need just a change for a single domain, it's recommended to use "Custom HTTPd Configuration" from admin level. If you'd like to add a custom block to every website, it can be done this way: https://www.directadmin.com/features.php?id=2155 (real-world example of /usr/local/directadmin/data/templates/custom/cust_httpd.CUSTOM.2.pre here: https://www.litespeedtech.com/suppo...:cache:common_installation:directadmin-shared). If you'd like to re-write complete template (not recommended, unless you're planning to maintain it): https://help.directadmin.com/item.php?id=2.

Regarding global settings, only /etc/httpd/conf/extra/httpd-includes.conf is not touched by "./build rewrite_confs", all the other files are always overriden from /usr/local/directadmin/custombuild/configure/ap2/conf, however, if you change something in configs, for example, /etc/httpd/conf/extra/httpd-mpm.conf, just copy it to /usr/local/directadmin/custombuild/custom/ap2/conf/extra/httpd-mpm.conf, and it will always use your customized file. It's also very easy to see what's customized on the systems, as you just check /usr/local/directadmin/custombuild/custom for CustomBuild customizations and /usr/local/directadmin/data/templates/custom for custom templates
 
Last edited:
Top