Looks like subdomain management is broken for some reason (debian 11 bullseye) DA version 1.672

mekmek

Verified User
Joined
Mar 12, 2021
Messages
15
Location
Netherlands
Hi @all,

I have (I think) some issue with Apache vhosts and subdomain management (looks like it has been broken since the upgrade from version 1.671 to 1.672 (not 100% sure it's related to this version, but could be). It's pointing to the default public_html default domain folder for some reason.

I did configure some test.mydomain.ext as test, but this is also pointing to the default placeholder with the Apache default text: 'webserver is functioning normally'. Strange thing here also is https (letsencrypt) is also pointing to the default domain on the server and it's not serving the test.domain.ext. When I do some checks at the certificate, the certificate has been configured with the test.domain.ext and it's valid.

apache2: config files looks like this:

/usr/local/directadmin/data/users/admin/httpd.conf

Code:
<VirtualHost IPV4IPhere:80 >
        ServerName test.domain.ext
        ServerAlias testje.domain.ext
        ServerAdmin [email protected]
        DocumentRoot "/home/admin/domains/test.domain.ext/public_html"
        ScriptAlias /cgi-bin/ "/home/admin/domains/test.domain.ext/public_html/cgi-bin/"
        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]
        SuexecUserGroup admin admin  
        CustomLog /var/log/httpd/domains/test.domain.ext.bytes bytes
        CustomLog /var/log/httpd/domains/test.domain.ext.log combined
        ErrorLog /var/log/httpd/domains/test.domain.ext.error.log
        <Directory "/home/admin/domains/test.domain.ext/public_html">
                <FilesMatch "\.(inc|php|phtml|phps)$">
                        <If "-f %{REQUEST_FILENAME}">
                                #ProxyErrorOverride on
                                <IfVersion > 2.4.59>
                                        ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "%{unescape:%{SCRIPT_FILENAME}}"
                                </IfVersion>
                                AddHandler "proxy:unix:/usr/local/php82/sockets/admin.sock|fcgi://localhost" .inc>
                        </If>
                </FilesMatch>
                <FilesMatch "\.(php53|php54|php55|php56|php70|php71|php72|php73|php74|php80|php81|php82)$">
                        Order Allow,Deny
                        Deny from all
                </FilesMatch>
        </Directory>
</VirtualHost>

<VirtualHost IPV4IPhere:443 >
        ServerName test.domain.ext
        ServerAlias testje.domain.ext
        ServerAdmin [email protected]
        DocumentRoot "/home/admin/domains/test.domain.ext/public_html"
        ScriptAlias /cgi-bin/ "/home/admin/domains/test.domain.ext/public_html/cgi-bin/"
        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]
        SuexecUserGroup admin admin  
        CustomLog /var/log/httpd/domains/test.domain.ext.bytes bytes
        CustomLog /var/log/httpd/domains/test.domain.ext.log combined
        ErrorLog /var/log/httpd/domains/test.domain.ext.error.log
        <Directory "/home/admin/domains/test.domain.ext/public_html">
                <FilesMatch "\.(inc|php|phtml|phps)$">
                        <If "-f %{REQUEST_FILENAME}">
                                #ProxyErrorOverride on
                                <IfVersion > 2.4.59>
                                        ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "%{unescape:%{SCRIPT_FILENAME}}"
                                </IfVersion>
                                AddHandler "proxy:unix:/usr/local/php82/sockets/admin.sock|fcgi://localhost" .inc>
                        </If>
                </FilesMatch>
                <FilesMatch "\.(php53|php54|php55|php56|php70|php71|php72|php73|php74|php80|php81|php82)$">
                        Order Allow,Deny
                        Deny from all
                </FilesMatch>
        </Directory>
</VirtualHost>

Known issue?, any tips/tricks what I could do to fix this.

Server version:
Code:
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"

Directadmin version: 1.672 (DirectAdmin legacy)

All updates/upgrades has been done.

PS Is it save to downgrade to: version: 1.671 (stable channel) to check if this will solve my problem (not yet done some downgrades in the past)
Looks like I have now the Currecnt channel active which is serving version: 1.672 by default.

Many thanks+

Grtz,
Mek.
 
Hello Mek,

It most likely means, that your Apache's installation is broken. Probably there is an issue with syntax or missing module, anything else, that makes a syntax test to fail. When a new domain/subdomain is added, DirectAdmin tests a webserver syntax, and if everything is fine, then the webserver is either reloaded or restarted. Directadmin won't reload/restart the webserver if syntax test fails. And if you reboot the server, you will most likely find your Apache down.

If this is the case, you will need to connect as root over SSH and run the following command:

Code:
apachectl -t

It is expected to give simple Syntax OK with or without warnings. If it reports errors, you will need to fix them. Should you need any assistance with reported errors, we will need to see the full text (you might hide/fake domains and/or IP).

If no error is reported, then you might try and restart Apache manually. If it does not help, then you will need to make sure your subdomain resolves to a valid IP, which should be the same as in Apache's settings. It includes both IPv4 and IPv6.

I did configure some test.mydomain.ext as test, but this is also pointing to the default placeholder with the Apache default text: 'webserver is functioning normally'.
 
Back
Top