Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: How to setup One Apache support multiple different webapp |
|
Author |
|
fsloke
Joined: 13 Nov 2009 Posts: 1
|
Posted: Sat 14 Nov '09 10:34 Post subject: How to setup One Apache support multiple different webapp |
|
|
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
|
Posted: Sun 15 Nov '09 1:01 Post subject: |
|
|
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
|
Posted: Sun 15 Nov '09 1:35 Post subject: |
|
|
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 |
|
|
|
|
|
|