Find the answer to your Linux question:
Results 1 to 2 of 2
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! pendal's Avatar
    Join Date
    Jan 2008
    Posts
    15

    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

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •