LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-10-2005, 03:32 PM   #1
cambie
Member
 
Registered: Jul 2004
Posts: 90

Rep: Reputation: 15
apache and url help


I am trying to configure apache so that I can have two seperate domain names point to the same server, but get forwarded to other ports on the box.

For example, I want somedomain.company.com to point to 192.168.1.10:8080 and i want another.company.com to point to 192.168.1.10:9000. I was thinking I might be able to accomplish this with a Virtual Host, but i haven't figured out how. I was able to set this up when I only wanted one domain name associated with the server using a mod_rewrite rule. But having two names makes it trickier for me.

Can anyone suggest a good way to handle this?
 
Old 08-11-2005, 08:49 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Your correct on setting up a virtual host, it would look something like this:

Code:
<VirtualHost *:8080>
        ServerName somedomain.company.com
        RewriteEngine     On
        RewriteRule       ^(.*)$        http://192.168.1.10$1  [P]
</VirtualHost>
And just be sure to have that domain listening on the proper port you specify that is being redirected to. It is possible to use port 80 with multiple machines as well for these virtual hosts. If these are public domains, some surfers might be blocked to view sites on ports other than 80, but just a FYI.
 
  


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
Apache proxypass url prob collen Linux - Software 0 10-14-2005 06:59 AM
Apache -- Changing requested URL to another name AnthonyM Linux - General 0 09-24-2004 07:34 PM
Apache and non-existing URL Mn3moniC Linux - Networking 0 07-06-2004 01:00 PM
apache, url play Robert0380 Linux - Software 5 06-08-2003 02:04 PM
Apache Url simquest Linux - Software 2 11-26-2002 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:45 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
Open Source Consulting | Domain Registration