Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The problem:

On my local machine only, I want to enter the URL homepage.local and I want it to open my local webpage index.html found in my local directory /Users/prime/Homepage/. I thought I could achieve this by using the below vhost configuration but it doesn't seem to work.

Added the following to my httpd.conf file

<VirtualHost *:80>
    ServerName homepage.local
    ServerAlias *.homepage.local
    DocumentRoot "/Users/prime/Homepage/"

and when I go to my web-browser and enter the URL homepage.local it does not resolve to my webpage /Users/prime/Homepage/index.html

Any ideas? I can't see anything in the apache error logs.

$ apachectl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   homepage.local (/private/etc/apache2/httpd.conf:533)

I am on OSX (Snow Leopard).

share|improve this question

migrated from Aug 11 '11 at 8:55

This question came from our site for professional and enthusiast programmers.

Is homepage.local actually pointing to your local machine? Did you set up the DNS or hosts entries? Does it show the local IP ( when you do ping homepage.local? – Pekka 웃 Aug 11 '11 at 7:42
@Pekka: The .local pseudo-TLD is supplied by Avahi/Zeroconf, which is configured by default on OS X. – cdhowie Aug 11 '11 at 7:43

Did you set up your host file? Server name directive does nothing unless the network resolves to the server properly.

You can edit your hosts file by following these directions here. Except you want to keep the ip address the same and just change the name to homepage.local.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.