Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have configured all my websites in the "Sites" folder to be tested in my browser. When I type a web address for example http://test.dev, I get "It Works".

Why?

share|improve this question
3  
Because you haven't configured it to say anything else? –  Zoredache Dec 25 '10 at 15:07
add comment

3 Answers

That's the default Apache HTTP index page. It's there to indicate you've correctly installed and enabled httpd.

share|improve this answer
8  
In other words, because "It Works". –  mattdm Dec 24 '10 at 22:14
add comment

This probably means that you don't have a specific entry in your web server configuration for for the IP address (if using IP-based virtual hosting) or the name you are trying to reach (test.dev, in your example, if using name-based virtual hosting).

For example, in Apache you can create <VirtualHost> sections which specify the document root for requests that match the IP and/or name (again, depending on if you're doing IP or name based virtuals). If none of those match, it will fall back to the DocumentRoot and other settings that are set outside of the <VirtualHost> entries.

So, to resolve it you could either make the virtual host config for the site that you want to receive these requests include this name/IP that isn't currently matching (preferable) or make one of your sites existing in the main config instead of in a <VirtualHost> (or similar depending on the web server you are using) section.

share|improve this answer
add comment

That page is located in /Library/Webserver/Documents.

You need to make sure you uncomment the second line of the following:

# User home directories
Include /private/etc/apache2/extra/httpd-userdir.conf

That file then includes the files in /private/etc/apache2/users

There should be one with your username.

You can then go to localhost/~username, which is equivalent of visiting Users/username/Sites

share|improve this answer
add comment

Your Answer

 
discard

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.