1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: DirectoryIndex not working locally

Discussion in 'Web Design & Development' started by cristobal03, Feb 13, 2007.

Thread Status:
Not open for further replies.
  1. cristobal03

    cristobal03 Thread Starter

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    Wow. So it's been, I don't know...half a year? since I posted here, but anyway. I'm trying to configure my Apache 2.2.x to serve development space on a local network. I've managed just about everything I need on my own (as far as I know) except for this stupid little issue. My DirectoryIndex directive is not working on the server machine (which is, of course, my development machine). Any requests I make to //host/ get the default "It Works!" page, but if I go to a different computer and browse to the same URI, my pages are served correctly. Even more frustrating, if I request //host/ on my box, it isn't even logged in the access logs. On other machines, the log reads "GET / HTTP/1.1" and so on.

    This is driving me absolutely crazy-go-nuts. I should mention this is the first time I've ever installed and configured a web server. But still, except for this one little thing, everything else works fine for my needs. What am I missing?

    Thanks,

    chris.
     
  2. cristobal03

    cristobal03 Thread Starter

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    [bump]

    Any ideas? It seems like I've seen similar postings on apache listservs, but unfortunately I didn't save the links (there weren't any responses to those, either). Anything suggestions at all would be more than I can come up with at the moment. Thanks again.

    chris.
     
  3. cristobal03

    cristobal03 Thread Starter

    Joined:
    Aug 5, 2005
    Messages:
    3,086
    [bump 2]

    Fixed it. In my httpd.conf file, the ServerName directive wasn't clearly defined. Originally I had
    Code:
    ServerName :80
    Which I suppose means that Apache only handled incoming requests through port 80 on the fixed IP address for my machine. (This is really me just guessing.) So I qualified the server name like so:
    Code:
    ServerName localhost:80
    Not sure about the mechanics of the solution, but it works now, so. Hope this is useful to someone in the future.

    chris.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/543810

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice