I need to setup some
VirtualHost records for a MAMP server I have installed on my Mac. In short, rather than using
http://localhost:8888/dkbtherapy/index.html I want to use
http://l.dkbtherapy.com. However, with the configuration I've done it doesn't work.
/Applications/MAMP/conf/Apache folder I modified the
httpd.conf file an added this
<VirtualHost *:8888> DocumentRoot /Applications/MAMP/htdocs/dkbtherapy ServerName l.dkbtherapy.com </VirtualHost>
so that should setup the routing for it (I thought). Then I modified my
hosts file and added this:
but when I type in
l.dkbtherapy.com into Safari I get:
Safari can't find the server.
Now, I rebooted the Apache server after making the changes, but I haven't rebooted my Mac. Though I don't think I need to reboot my Mac. What did I miss in the above configuration?
NOTE: after making the changes
http://localhost:8888/dkbtherapy/index.html doesn't work now either, I get a
404 returned with this message:
The requested URL /dkbtherapy/index.php was not found on this server.
EDIT: after looking at my Windows box, where I've configured this and it's working, I noticed I missed a line of configuration -it appeared -so I added this to the one on the Mac too:
EDIT RELATING TO
http://localhost:8888/dkbtherapy/index.html: when I look at the error log for Apache I see this error when I try and navigate to that path:
[Fri May 31 11:23:41 2013] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/dkbtherapy/dkbtherapy
so for some reason it thinks that
dkbtherapy is the absolute root for the server it appears -how did I manage that?