Apache Virtual Host ConfigurationPosted: April 30, 2012
Linux and Apache great and frustrating all at the same time, how can this be !!!!!!!
Configuring an Apache server to run multiple web sites, nothing hard in that I hear you say.
For those who need a quick lesson, find the httpd.conf file and add lines of code at the end to mirror something like this.
httpd.conf is usually foounf in /etc/httpd/conf or /usr/local/apache2/conf depending on how it was installed.
To host multiple site you use the virtualhost parameters. So a simple site config is to host http://www.acmetest.com on the local server
Options -Indexes +FollowSymLinks +ExecCGI
AllowOverride AuthConfig FileInfo
Allow from all
So you would think this would work, but the default web server was still serving out the index.html page. After 1 hour of trying to work out what is wrong with these few lines I remembered in the back of my addled brain SElinux.
At a command line
Restart the web server and hey it WORKS!!!!
This is not advisable for production systems. There is more regarding how to allow Apache configuration and SELinux on the Centos Wiki. Navigate to Section 5.
I will be looking at further on a little later and let you know what the commands are to get a working site with SELinux enabled.