1

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
alme1304
  • 141
  • 1
  • 6

1 Answers1

-2

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

alexus
  • 12,342
  • 27
  • 115
  • 173