LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-16-2007, 02:59 AM   #1
yuye811
LQ Newbie
 
Registered: Dec 2007
Posts: 17

Rep: Reputation: 0
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 :-)
 
Old 12-16-2007, 05:44 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
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.
 
Old 12-17-2007, 12:13 PM   #3
yuye811
LQ Newbie
 
Registered: Dec 2007
Posts: 17

Original Poster
Rep: Reputation: 0
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".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redhat 7 what file is being used to assign my multiple IPs? TooSlow Linux - Networking 3 10-24-2007 11:35 AM
How do I access users' folders on an sme server mabalela Linux - Networking 0 12-18-2006 08:44 AM
assign new data partition to specific users wycolorado Linux - Newbie 2 01-01-2005 09:53 PM
how to assign users access to new partitions wycolorado SUSE / openSUSE 2 01-01-2005 09:48 PM
how to assign 2 IPs to a computer dragon Linux - Networking 6 11-05-2002 08:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration