+ Post New Thread
Results 1 to 8 of 8
Web Development Thread, Apache VirtualHosts in Coding and Web Development; Can anyone spot what I am doing wrong? I am trying to setup a test Apache server to allow staff ...
  1. #1

    TechMonkey's Avatar
    Join Date
    Dec 2005
    Location
    South East
    Posts
    3,286
    Thank Post
    225
    Thanked 405 Times in 302 Posts
    Rep Power
    162

    Apache VirtualHosts

    Can anyone spot what I am doing wrong?

    I am trying to setup a test Apache server to allow staff to look at Moodle and have a play. I have a station running everything fine but I want a simple name for them to enter in the address bar. I have setup the DNS fine but the VirtualHosts seems to be causing me trouble.

    So I want EduGeek.net to go to the moodle installation. moodle is redirected by DNS to that station.

    In the http.conf I have:
    Code:
    NameVirtualHost *:80
    
    <VirtualHost *:80>
    DocumentRoot "C:/Program files/xampp/htdocs/moodle"
    ServerName moodle
    </VirtualHost>
    But nothing happens. That document path is correct for the folder moodle is installed on & all I get is a network timeout error.

    Any ideas?

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,688
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    If you're getting a network timeout error; it's nothing to do with your vhost mate assuming apache is actually running at http://1.2.3.4

    More likely the DNS (or even further more likely is that it's trying to through your proxy).

  3. #3

    TechMonkey's Avatar
    Join Date
    Dec 2005
    Location
    South East
    Posts
    3,286
    Thank Post
    225
    Thanked 405 Times in 302 Posts
    Rep Power
    162
    Well "moodle" is in my proxy bypass settings and before setting the virtualHost I could use "moodle" to go to the document root fine. It just gives this error when teh VH is being used.

  4. #4


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,688
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    So ignoring the vhost for a second, can you still access the "real" document root via the boxes IP. (In effect checking whether Apache is actually running properly)

    Failing that; check the logs as apache is pretty verbose when vhosts are annoying it, but I've not used it on Windows so can't do too much

  5. #5

    Join Date
    Jun 2007
    Posts
    35
    Thank Post
    4
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Im not sure if this will help but my vhost files look like this:

    <VirtualHost *>
    DocumentRoot "/var/www_external"
    ServerName moodle

    <Directory "/var/www_external">
    allow from all
    Options +Indexes
    </Directory>
    </VirtualHost>

    When you restart apache it normally tells you of any problems, I see you are using XAMPP, try checking the httpd.log for clues.

  6. #6

    TechMonkey's Avatar
    Join Date
    Dec 2005
    Location
    South East
    Posts
    3,286
    Thank Post
    225
    Thanked 405 Times in 302 Posts
    Rep Power
    162
    DOH!!! GRRRRRRRR. Just found that somewhere along the way the config file had saved to a completely different server!!! WHY!! SO I'll start this again.

  7. #7


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,688
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    =) - It happens...

  8. #8

    TechMonkey's Avatar
    Join Date
    Dec 2005
    Location
    South East
    Posts
    3,286
    Thank Post
    225
    Thanked 405 Times in 302 Posts
    Rep Power
    162
    & I have just got it working first time. Although this time I switched to using the httpd-vhosts.conf file. why couldn't this have happened 3 hours ago!! Ta for the help though all

SHARE:
+ Post New Thread

Similar Threads

  1. Apache rewrite
    By Michael_84 in forum Web Development
    Replies: 0
    Last Post: 1st December 2008, 12:57 PM
  2. Apache 2.2 configuration
    By saundersmatt in forum Web Development
    Replies: 3
    Last Post: 12th July 2008, 09:17 AM
  3. Apache realms...again
    By HodgeHi in forum Mac
    Replies: 1
    Last Post: 28th January 2008, 04:16 PM
  4. Apache 2.2 and mod_perl
    By apeo in forum Web Development
    Replies: 3
    Last Post: 6th November 2007, 10:40 AM
  5. Apache on windows
    By apeo in forum Windows
    Replies: 16
    Last Post: 28th March 2007, 01:09 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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