Hello Richard,I don't know how CentOs configures httpd, but I suppose You have a main config file which includes all config files contained in /etc/httpd/conf.d ; is it the case ?
Le 13/12/2020 à 13:26, Richard B. Pyne a écrit :
I know this has been asked numerous time, and I have read hours worth of post and guides with no success. I set up a new server running Apache 2.4.6 on CentOS 7.9 a while back with only one virtual host. The original vhost still works, but the second one ignores the host name.I have two virtual host conf files in /etc/httpd/conf.d example1.com.conf <VirtualHost *:80> ServerName example1.com ServerAlias www.example1.com DocumentRoot /var/www/t/example1.com/public_html ServerAdmin webmaster@xxxxxxxxxxx CustomLog /var/www/t/example1.com/access_log combined ErrorLog /var/www/t/example1.com/error_log <Directory "/var/www/t/example1.com/public_html"> Options -Indexes +FollowSymlinks AllowOverride All Require all granted </Directory> </VirtualHost> example2.com.conf <VirtualHost *:80> ServerName example2.com ServerAlias www.example2.com DocumentRoot /var/www/t/example2.com/public_html ServerAdmin webmaster@xxxxxxxxxxx CustomLog /var/www/t/example2.com/access_log combined ErrorLog /var/www/t/example2.com/error_log <Directory "/var/www/t/example2.com/public_html"> Options -Indexes +FollowSymlinks AllowOverride All Require all granted </Directory> </VirtualHost>I enabled ForensicLog and the log shows the correct Host: values, httpd -S shows all of the conf files and ServerNames, but regardless, all requests are being served from the /var/www/html default DocumentRoot.Any help will be greatly appreciated. Thanks, --Richard --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx