Reputation: 2044
I have a system CentOS with Django and MySQL.
/home/user1/
-/vhost/*.conf
-/webapps/
abc.com
xyz.com
/home/user2/
-/vhost/*.conf
-/webapps/
123.com
789.com
Thanks for help!
UPDATE 1: In httpd.conf:
User user1
Group apache
And httpd cannot access /home/user2/webapps.
Upvotes: 0
Views: 3062
Reputation: 39773
You'll want to read up on Apache Vhost Configuration.
Tell us what you tried, what is working, what is not working, or what you don't understand.
If your system has 1 IP address for all sites, you're going to want something like this:
#This is your 'default' host,
#people accessing the site via IP-address will see this site.
<VirtualHost *:80>
ServerName abc.com
ServerAlias xyz.com
DocumentRoot /home/user1/webapps/
</VirtualHost>
#This is the 123 and 789 vhost
<VirtualHost *:80>
ServerName 123.com
ServerAlias 789.com
DocumentRoot /home/user2/webapps/
</VirtualHost>
You can add all directives as explained by the <VirtualHost> Directive
Upvotes: 1