0

I am trying to configure a local subdomain but for some reason both my virtual directory and localhost are pointing the same. I tried using the solution in this thread:

Local virtual hosts pointing to the same directory

But it does not work.

here is the code for my /etc/apache2/extra/httpd-vhosts.conf file"

<VirtualHost *:80>
DocumentRoot "/Users/lemmy/Applications/"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/Users/lemmy/Applications/storke/"
    ServerName local.storke
    DirectoryIndex index.html
    ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
    CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" com$
</VirtualHost>

And here is the code for my /etc/hosts file

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost


#Mapping new local hosts

127.0.0.1       local.storke

For some reason both local.storke and localhost point to the same (localhost Applications root) directory. In order for me to access the root for storke I need to type in http://local.storke/storke or http://localhost/storke which makes it pointles to have a virtual directory in the first place.

Any ideas of what may be happening? I am using MAC with MAMP (not the pro version).

Regards

Community
  • 1
  • 1
HGB
  • 2,157
  • 8
  • 43
  • 74

0 Answers0