logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to setup One Apache support multiple different webapp
Author
fsloke



Joined: 13 Nov 2009
Posts: 1

PostPosted: Sat 14 Nov '09 10:34    Post subject: How to setup One Apache support multiple different webapp Reply with quote

I installed apache into my PC by go through the tutorial in Apache/PHP installation guide, http://www.apachelounge.com/viewtopic.php?t=2281

Now it working accordingly the word "It works!" showed.
1 Apache 1 Webapp with url access : http://localhost/

Now I need to change in such one Apache support multiple webapp.

Example:
When user type url below:
system1.example.com the apache will direct the user to system1 webapp
When user type url below:
system2.example.com the apache will direct the user to system2 webapp

Can you all help me one this by Give me some direct so the task can be completed?

Thanks
Back to top
itproxy



Joined: 17 Jan 2009
Posts: 14

PostPosted: Sun 15 Nov '09 1:01    Post subject: Reply with quote

Hi fsloke,
I assume you mean, you want to set up multiple websites on one apache server?
You need to set up 'virtual hosts'; 'name based virtual hosts', probably.
You need to configure httpd.conf to 'include' httpd-vhosts.conf eg uncomment this line in httpd.conf:

#Include conf/extra/httpd-vhosts.conf

then edit httpd-vhosts.conf. The first <virtual host> in the latter should be the same as your default server settings, then add <virtual host> sections for each additional website.

It's explained here: http://httpd.apache.org/docs/2.2/vhosts/
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sun 15 Nov '09 1:35    Post subject: Reply with quote

on the page itproxy has posted for you .. take note of the "Main Host Goes Away" section. If you don't, you'll be wondering why it does not work properly. This is where new folks typically trip.
Back to top


Reply to topic   Topic: How to setup One Apache support multiple different webapp View previous topic :: View next topic
Post new topic   Forum Index -> Apache