Re: virtual host DocumentRoot being ignored

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



check "apachectl -S" output to make sure what virtualhosts you are really using.

El dom, 13 dic 2020 a las 15:20, Richard B. Pyne (<rpyne@xxxxxxxxxxx>) escribió:
>
> Hi Lucien,
>
> Yes. that is the case. It is /etc/httpd/conf.d
>
> The last line of the main config file /etc/httpd/conf/httpd.conf file is
>
> IncludeOptional conf.d/*.conf
>
>
> On 12/13/2020 5:38 AM, Lucien Gentis wrote:
> > 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>


-- 
Daniel Ferradal
HTTPD Project
#httpd help at Freenode

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux