LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Assign different folders/users to different IPs on the same dedicated server (https://www.linuxquestions.org/questions/linux-server-73/assign-different-folders-users-to-different-ips-on-the-same-dedicated-server-607075/)

yuye811 12-16-2007 02:59 AM

Assign different folders/users to different IPs on the same dedicated server
 
CentOS 5
Apache 2

I just bought a new dedicated server with 2 ips. Assumes they are:
1.1.1.1
2.2.2.2

I want following:
1.1.1.1 --> /home/user1/public_html
2.2.2.2 --> /home/user2/public_html

I know I could do this by setting virtual hosts in the conf files.


I have a old godaddy VPS. Which gives 3 ips to 3 different domains.
When I check the conf on this vps server. it totally confused me, because httpd.conf is never configure to use virtual hosts.

So my question is : how did godaddy vps achieve the goal without using virtual hosts ? Or am I missing out something here ?

Thanks very much in advance for answering :-)

dkm999 12-16-2007 05:44 PM

There are two ways that this can be accomplished, sort of.

1. Run a separate httpd server (with its own httpd.conf file) that will listen to only one IP. The server details , including the IP and port that the server should listen on, can then all be contained in the httpd.conf file that is specific to that instance of httpd.

2. (Much more likely.) For some time now, the Apache httpd has had the capacity to include other config files in the configuration data via the Include directive. For nearly that long, there has been a line near the top of my httpd.conf file that says
Quote:

Include conf.d/*.conf
The effect of this directive is to include any config file that it finds in the named directory (/etc/httpd/conf.d on my system) in the run-time configuration for a single server that listens on all the IP addresses available to its host machine. This scheme doesn't actually avoid using the Virtual Server setup, but makes it fairly invisible, except to the poor slob who sets it up.

yuye811 12-17-2007 12:13 PM

Thanks dkm999
 
dkm999,
Thanks and You are right, I went through the files in /etc/httpd/conf.d/ folder. The virtual hosts directives are in a file called "turbopanel.conf".


All times are GMT -5. The time now is 04:50 AM.