Virtual Host web page changed to default apache page

I have configured multiple virtual hosts in Centos 7 with the configuration files located in /etc/httpd/sites-available/ directory with configuration files for each subdomain as:,, etc.

The web folder for each subdomain is located at:


I have a difault index.html page in each ‘public_html’ folder to test the web site is working ok.

The virtual host configuration files for each of these subdomains are located at:

/etc/httpd/sites-enabled/ etc.

I was able to view the default page for each subdomain as http domain.

After a number of attempts, I managed to successfully generate and installed Letsencrypt certificate one for each subdomain. I have also configured under ‘non-ssl.conf’ file located under /etc/httpd/conf.d/ to forward port 80 to port 443.

<VirtualHost :80>
** ServerName
** Redirect “/” “”**

This redirection also works fine.

However when I visit the url ‘’ it displays a common apache default web page. The same page is displayed under all other subdomains.

On the default apache web page the following instruction is displayed:

Are you the Administrator?
You should add your website content to the directory /var/www/html/.
To prevent this page from ever being used, follow the instructions in the file /etc/httpd/conf.d/welcome.conf.

Need advise on where I should change the configuration for each of these subdomains to use the web folder already configured rather than go to one single folder ‘/var/www’

I need each https subdomain to use the web folder such as: > > /var/www/ > > /var/www/ > > /var/www/

While generating the cert, I also observed the following status change:

"Redirecting vhost in /etc/httpd/sites-enabled/ to ssl vhost in /etc/httpd/conf.d/non-ssl-le-ssl.conf"

I am at a loss to know how to use Letsencrypt Cert and configure to use the web folders already configured and not change it.

Looking forward to receiving some advise on how to achieve this.


I managed to resolve the problem by adding the following line in the ‘non-ssl-le-ssl.conf’ file:

DocumentRoot /var/www/

Hope this helps someone who may be experiencing similar problem.


Now that I have been able to resolve the issue I was facing while installing Letsencrypt cert, I would like to get some clarification on the implication of redirecting ‘vhost’ from " /etc/httpd/sites-enabled/ to ssl vhost in /etc/httpd/conf.d/non-ssl-le-ssl.con.
a) Does this mean whatever I have entered in the conf file under ‘sites-enabled’ directory is redundant and will not be used?
b) Is it possible to reconfigure to continue to use the config file under ‘sites-enables’? with any additional entries that is needed to support ‘Letsencrypt SSL’ ?
Would appreciate some clarification.
c) Where exactly in the files can I find the code added to ‘redirect’ the ‘vhost’?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.