LinuxQuestions.org
Help answer threads with 0 replies.
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 09-28-2007, 06:13 AM   #1
jordankoppole
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Rep: Reputation: 0
Apache2 Virtual host on LAN


Hi,

I want to run different apps whose cgi-bins are different. Virtual host configuration gives about the domain name. I access the machine with ip like http://xx.xx.xx.xx/abcd. If I want diff apps on that server I can go with different ports. How do i setup it using ports or urls..


Thanks
 
Old 09-28-2007, 06:22 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
accessing a web server by ip address is never a good idea. can you really not use some form of DNS or local hosts files at worst??
 
Old 09-29-2007, 07:45 AM   #3
lucastic
Member
 
Registered: Aug 2003
Location: Oz
Distribution: Gentoo - Debian
Posts: 202

Rep: Reputation: 30
What exactly is it you are trying to do, perhaps with a few more details we can give you a better answer.
 
Old 09-30-2007, 11:01 PM   #4
jordankoppole
LQ Newbie
 
Registered: Sep 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Setup

Actually i am trying to run diff versions of a application on the same server. The requests to the apache in turn will be passed to the one of the multiple tomcat servers running. But I use cgi-bin also because of which I need multiple virtual hosts. Hope I am clear
 
Old 10-16-2007, 10:57 AM   #5
bjagee
Member
 
Registered: Jan 2007
Location: Portland, OR
Distribution: Ubuntu Jaunty / Fedora
Posts: 39

Rep: Reputation: 15
Add the desired ports to the httpd.conf (or ports.conf file if you have one).

Code:
Listen 80

# Uncomment the following if you will be using SSL
# Listen 443

# Add any additional ports here.
# Listen ??
You can also specify a listen on only one ip/port:
Code:
 Listen 192.168.1.1:8000
Next you need to set up virtual hosts on the desired ports. The easiest way to do this is to create a custom .conf file for the host with all of the settings in it and include it at the end of your apache2.conf or httpd.conf.

Code:
include /path/to/virtualhostfile.conf
Code:
<VirtualHost 192.168.1.1:8000>
DocumentRoot /path/to/html
...
</VirtualHost>
It is actually best to use names when you can; if you choose to do that you can do name based hosting. I wrote a post on apache2 with virtual hosting if you need more resources.
 
  


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
Apache2 virtual host. hgb Linux - Networking 10 01-24-2009 03:05 AM
Apache2 Virtual Host SSI problems superscrappy Linux - Software 1 08-30-2005 06:04 PM
apache2 help -Virtual Host- Fredstar *BSD 4 06-06-2005 02:09 PM
Can't do Apache2 virtual host different ports SK_pt Linux - Software 3 01-30-2005 08:04 PM
apache2, virtual host problems rjcrews Linux - Software 13 05-25-2004 09:16 PM


All times are GMT -5. The time now is 01:55 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration