Please help me setup correct configuration on apache server. I don't know what it is called but I want to setup multiple sites on my server (Amazon EC2 (CentOS) server). It doesn't have a domain name yet.
I have installed the required software including php (checked with phpinfo.php). It is working fine.
Now, I want to host two different php based sites on my machine.
Assume, my IP address is x.y.z.a
Directories :
/var/www/html/crm
/var/www/html/crmpanel
/var/www/html/mysite
In my httpd.conf, I have :
NameVirtualHost *:80
ServerName x.y.z.a
DocumentRoot "/var/www/html"
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName x.y.z.a
ServerAlias x.y.z.a
DocumentRoot "/var/www/html/crm"
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName x.y.z.a
ServerAlias x.y.z.a
DocumentRoot "/var/www/html/crmpanel"
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName x.y.z.a
ServerAlias x.y.z.a
DocumentRoot "/var/www/html/mysite"
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
</VirtualHost>
If I run "httpd -S", it returns 'Syntax OK'. Apache server starts without any errors.
Please help me understand what is wrong in my configuration.