Thanks Eric -
Yes, it was DocumentRoot, a typo in my email only - sorry .
I now have ALL site in separate VHosts .
I put all the default directory entries in conf/httpd.conf into
a separate conf.d/Apache.conf :
<VirtualHost *:80>
ServerName $HOST_DNS_NAME:80
include conf.d/Apache.dir
</VirtualHost>
And my ssl.conf now does:
<VirtualHost *:443>
... # original ssl.conf
ServerName $HOST_DNS_NAME:443
include conf.d/Apache.dir
</VirtualHost>
And my A & B conf are both (where $PORT is either 2x080 or 1x080)
(numbers redacted):
conf.d/A.conf:
Listen $HOST_DNS_IP:1x080 https
<VirtualHost *:1x080>
ServerAdmin ${ME}@localhost
ServerName $HOST_DNS_NAME:1x080
DocumentRoot "/opt/A"
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
ErrorLog "logs/A-error_log"
TransferLog "logs/A-access_log"
<Directory "/opt/A">
Options +ExecCGI +Includes +Indexes +FollowSymLinks
require all granted
</Directory>
</VirtualHost>
conf.d/B.conf:
Listen $HOST_DNS_IP:2x080 https
<VirtualHost *:2x080>
ServerName $HOST_DNS_NAME:2x080
ServerAdmin ${ME}@localhost
DocumentRoot "/opt/B"
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
ErrorLog "logs/B-error_log"
TransferLog "logs/B-access_log"
<Directory "/opt/B">
Options +ExecCGI +Includes +Indexes +FollowSymLinks
require all granted
</Directory>
</VirtualHost>
I also created a _default_.conf file containing:
<VirtualHost _default_:*>
</VirtualHost>
httpd starts and httpd -S says :
httpd -S
VirtualHost configuration:
*:80 $HOST_DNS_NAME (/etc/httpd/conf.d/Apache.conf:1)
*:48080 $HOST_DNS_NAME (/etc/httpd/conf.d/B.conf:5)
*:* $HOST_DNS_NAME (/etc/httpd/conf.d/_default_.conf:1)
*:60080 $HOST_DNS_NAME (/etc/httpd/conf.d/B.conf:5)
*:443 $HOST_DNS_NAME (/etc/httpd/conf.d/ssl.conf:56)
But still, a request to either $HOST_DNS_NAME:1x080 or
$HOST_DNS_NAME:2x080 returns the same page as :80 or :443,
the "Testing 123" default Apache test page.
Any ideas how to get them to serve the DocumentRoot and
Directory entries in their VirtualHost entries ?
Thanks & Best Regards,
Jason
On 27/12/2021, Eric Covener <[email protected]> wrote:
>> <VirtualHost *:10080>
>> Directory "/opt/A"
>
> Did you mean DocumentRoot?
>
> Can you show the verbatim config for one of the virtual hosts?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]