Hostname Apache VirtualHosts not generated (AlmaLinux 9 and 10)

Started by Wonder, October 31, 2026, 11:42:50 PM

Previous topic - Next topic

Wonder

Hello,

I have encountered an issue with the Apache hostname VirtualHost configuration on both AlmaLinux 9 and AlmaLinux 10.2 installations running CWP.

I'm currently testing CWP 1.30 on a VPS running AlmaLinux 10.2, where the following Apache VirtualHost configuration files for the server hostname were missing:

/usr/local/apache/conf.d/hostname.conf
/usr/local/apache/conf.d/hostname-ssl.conf

I previously encountered the same issue on AlmaLinux 9.

On AlmaLinux 10.2, both original CWP templates are present:

/usr/local/cwpsrv/htdocs/resources/conf/web_servers/main/httpd/conf.d/hostname.conf
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/main/httpd/conf.d/hostname-ssl.conf

I also used the Change Hostname feature in CWP to configure the hostname SSL certificate, but this did not generate the missing VirtualHost files.

The hostname SSL certificate was successfully generated and works correctly on the CWP panel (port 2031).

However, Apache did not have a dedicated SSL VirtualHost for the hostname, causing the following issues:

- Apache presented the SSL certificate of another hosted domain when accessing the hostname on port 443.
- Accessing https://srv3.aridahost.com/roundcube/ redirected to /webmail/ instead of opening Roundcube directly.

For comparison, I have two existing AlmaLinux 8 / CWP servers where both hostname VirtualHost files exist and Roundcube works directly under /roundcube/.

Temporary workaround:

I manually created the following files:

/usr/local/apache/conf.d/hostname.conf
/usr/local/apache/conf.d/hostname-ssl.conf

Both VirtualHosts include the hostname SSL certificate configuration and the reverse proxy directives for Roundcube and phpMyAdmin.

After reloading Apache:

- The correct hostname SSL certificate is presented on port 443.
- /roundcube/ works directly and returns HTTP 200.
- HTTPS works correctly over both IPv4 and IPv6.

The original CWP templates are present, so I suspect the issue may be related to the generation or deployment of the hostname VirtualHost configuration.

Is this a known issue affecting CWP installations on AlmaLinux 9 and 10? Should these files be generated automatically during installation or when using Change Hostname?

Thank you!