LinuxQuestions.org
Visit Jeremy's Blog.
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 05-12-2011, 09:35 AM   #1
Dilbert_halflife
LQ Newbie
 
Registered: May 2011
Posts: 3

Rep: Reputation: 0
Setting VirtualHost on Centos 5.5


I need to set-up different ports to be redirected to different directories on a client's server running Centos 5.5 and Apache2.

What I need to achieve is the following.

www.mysite.com:80
Goes to the normal users directory /var/www/html/normal

but

www.mysite.com:8080
Goes to a private admin directory /var/www/html/admin

I had no problem doing this on my own Ubuntu server using <VirtualHost>, but I can't find which file to put the <VirtualHost> in on Centos?

Or is there a better way of achieving the same result?

The ports bit is the way my client wants it to work, so I have no choice there.
 
Old 05-12-2011, 10:44 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
convention is that virtual hosts would be put in their own file in /etc/httpd/conf.d/ but they can be put directly in /etc/httpd/conf/httpd.conf if desired.

Note that you have no need at all for virtual hosts though, if they are on a different port, the hostname is irrelevant.
 
Old 05-12-2011, 11:10 AM   #3
Dilbert_halflife
LQ Newbie
 
Registered: May 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thumbs up Solved

Thanks,

I solved it and it now does what my client wants.

Last edited by Dilbert_halflife; 05-12-2011 at 11:16 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Centos 5.4 Apache 2.2.3 web server problem with virtualhost dalvis Linux - Server 1 07-30-2010 02:28 AM
setting up domain thru virtualhost on apache fiona333 Linux - Newbie 2 06-20-2007 05:27 PM
Apache 2.2.3 on CentOS 5 - VirtualHost problem djjoshuad Linux - Server 2 04-19-2007 12:54 PM
Apache - VirtualHost setting not working? Splenden Linux - Server 9 01-14-2007 12:15 PM
setting virtualhost without IP acid_kewpie Linux - Networking 3 12-10-2002 07:45 AM

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

All times are GMT -5. The time now is 05:21 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration