Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Servers
Reload this Page apache and virtual hosts and windows hosts file
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Servers Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Reply
 
Thread Tools Display Modes
Old 06-06-2008   #1 (permalink)
Just Joined!
 
pendal's Avatar
 
Join Date: Jan 2008
Posts: 13
apache and virtual hosts and windows hosts file

I am trying to setup a web server that will be used strictly for internal application.

our current web server being used for this is to old and I have to replace it. However, it was installed before I got here.

On the current web server anyone accessing it must type the following into their browser

http://192.168.0.5/timeclock
or
http://192.168.0.5/orders

etc... to access the various web applications on the system.

This has provided several problems for me as we use more web applications here.

1. the root web directory is very cluttered with all the different applications.
2. not everyone in the office understands the concept of an IP address.

What I would like to do is allow for the following to be typed into the browser

timeclock.pacex.com
orders.pacex.com

etc...

Currently I am using CentOS 5 and I have Apache version 2.2.3 installed. I am using webmin to configure apache

I set up virtual hosts within apache to allow for the different names.

I then accessed my hosts file on my client machine and made the following entries.

192.168.0.25 timeclock.pacex.com
192.168.0.25 orders.pacex.com

I applied the changes to the host file and restarted apache.

I then put an index.php file into the directories for the virtual hosts with a small echo command to tell me where I was.

when I goto one of the addresses, I get to my server but it is the main apache test page.

can anyone help me .. or at least explain why this doesn't work.

Thanks,
-P
__________________
If Linux isn't the solution... You have the wrong problem
pendal is offline   Reply With Quote
Old 06-06-2008   #2 (permalink)
Linux Engineer
 
jledhead's Avatar
 
Join Date: Oct 2004
Location: North Carolina
Posts: 810
so dns is working but both names take you to the same place?

you need to use name based virtual hosts - Google Search
either of the first 2 links depending on your version of apache (1.3 is the first and 2.2 is the second)

also search the forum because there are several topics that I know of explaining proper use of that parameter.
jledhead is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 04:45 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0