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 been trying to setup a local server to the ones mentioned here and here(added TLDR at the bottom), but I keep getting 404s no matter what I try. I can ping both google.com and xxxx.dev. So I assume that it a problem with apache and not dnsmasq, but I'm not 100% sure since I have never dealt with dnsmasq before.

This is what is currently in my [username].conf file

NameVirtualHost *:80

<Directory "/Users/[your-username]/Sites/">
  Options MultiViews FollowSymLinks Includes
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>

<VirtualHost *:80>
  UseCanonicalName off
  VirtualDocumentRoot /Users/[your-username]/Sites/%1
</VirtualHost>

in my network settings I have already setup 127.0.0.1 and 192.168.1.1 as my dns servers

and I have also verified that there is content in the above specified DocumentRoot folder

Edit: So my aim is to set all *.dev addresses to their corresponding folder in the Document root mentioned in apache .conf file. Not sure if I'm correct or not but dnsmasq is supposed to redirect all local requests to my machine with this in my /usr/local/etc/dnsmasq

address=/dev/127.0.0.1
listen-address=127.0.0.1
share|improve this question

1 Answer 1

your VirtualHost isn't setup correctly, read following documentation to see what you're missing: Apache Virtual Host documentation - Apache HTTP Server

share|improve this answer
    
And what is he missing? That's a big document-set to grep through. –  sysadmin1138 Jan 16 '13 at 22:41
    
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Mark Henderson Jan 16 '13 at 22:42
    
added the content of the sites to the question –  alme1304 Jan 16 '13 at 22:59
    
I think ServerName is missing there –  alexus Jan 17 '13 at 18:03

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.