Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Having trouble with Virtual Hosts on a Mac



Threaded Mode | Print  

 Having trouble with Virtual Hosts on a Mac (1 Replies, Read 8182 times)
hbcrosby
Group: Member
Post Group: Newbie
Posts: 2
Status:
I am having trouble setting up a vhost on a Mac.  I have done the following:

1) "Added" the domain 'newhire.hood.edu' and checked the host file box
    - pointed 'newhire.hood.edu' to /Applications/AMPPS/www/newhire
    - verified host file stated "127.0.0.1    newhire.hood.edu"

    ##
    # 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

    127.0.0.1      newhire.hood.edu

2) Verified that a virtual host was created in httpd-vhosts.conf

#### newhire.hood.edu VirtualHost ####
           

<VirtualHost 127.0.0.1:80>
<Directory "/Applications/AMPPS/www/newhire">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName newhire.hood.edu
ServerAlias newhire.hood.edu
ScriptAlias /cgi-bin/ "/Applications/AMPPS/www/newhire/cgi-bin/"
DocumentRoot "/Applications/AMPPS/www/newhire"
ErrorLog "/Applications/AMPPS/apache/logs/newhire.hood.edu.err"
CustomLog "/Applications/AMPPS/apache/logs/newhire.hood.edu.log" combined
</VirtualHost>

####################################

3) Unchecked the vhost line in httpd-conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Include conf/extra/httpd-hoodvhosts.conf

4) Added a second vhost pointer (just because) and file (httpd-hoodvhosts.conf)
    - made one change:  <VirtualHost newhire.hood.edu:80>

5) Made sure Apache "found" these files (apache/conf/extra)

6) Restarted Apache

When I enter "newhire.hood.edu" in a browser, it takes me to the root of /www.  I have to add '/newhire' to make it work.  I had it working last month when I originally set this up.  Apparently I updated/changed/screwed up something so that it stopped working.

Any advise would be appreciated!

Thank you.....
IP: --   

Having trouble with Virtual Hosts on a Mac
hbcrosby
Group: Member
Post Group: Newbie
Posts: 2
Status:
I think I found the answer........

Using AMPPS default file creation when I added a domain worked when I was on the Mac that AMPPS was installed.  I could not "see" the site from another box.  After a little Apache research, I made a single change in httpd-vhosts.conf.  I did not change any other file created by AMPPS:

From-           
<VirtualHost 127.0.0.1:80>
<Directory "/Applications/AMPPS/www/newhire">
etc.....
</VirtualHost>

To-
<VirtualHost *:80>
<Directory "/Applications/AMPPS/www/newhire">
etc.....
</VirtualHost>

and I was able to see the site from another box.
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 30, 2024, 2:57 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.061