• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Globally define virtual subdomains

C

cyberbrain

Guest
Is it possible to define global subdomains (just like the webmail.*.tld subdomain) which work for all domains on a server?

For example, i want to add editor.*.tld to provide my users with an webeditor. This editor is for example located in /var/editor/html

Thanks in advance.

CyberBrain
 
You can try to create a new 'test.conf' inside /etc/httpd/conf.d/ and describe there Virtual host for your subdomain 'editor.*.tld'.
Restart Apache. After that this file should be included by /etc/httpd/conf/httpd.conf as it is defined there:
# grep Include /etc/httpd/conf/httpd.conf
Include conf.d/*.conf
 
Thanks for your reply, I'll give it a try. Can I use a wildcard for the tld also? (e.g. editor.*.*)
 
Something like this - not exactly this, but sometihng like this

PHP:
<VirtualHost your.ip.goes.here:80 >
        DocumentRoot /root/of/site
        Alias /any aliases/
        ServerName editor
        ServerAlias editor.*
        UseCanonicalName Off
 </VirtualHost>

in /etc/httpd/conf.d/editor.conf
 
Back
Top