I just set up LAMP on a new CentOS server.
Previously when I installed LAMP on Ubuntu, I always needed to create a virtual host definition for each website I create in my
But on CentOS, I realised once I put my website into my
/var/www directory, it's immediately visible on my browser.
I included this directive:
Include conf/vhosts/*.conf in my
httpd.conf file in order to define virtual hosts for specific sites.
Inside my vhost directory, I have defined my
Can anyone tell me what needs to be edited, possibly in
httpd.conf, to stop sites that don't have an individual
/vhosts/*.conf file from displaying when visited?
Below is my default virtual host definition information which I amend for each new site:
<VirtualHost var/www/aSite:80> ServerAdmin firstname.lastname@example.org DocumentRoot var/www/aSite ServerName myServer ErrorLog var/www/aSite/logs/error_log CustomLog var/www/aSite/logs/access_log common </VirtualHost>