Results 1 to 4 of 4
  1. #1
    jleecbd
    Guest
    Virtual Hosts Locally
    Okay, I'm playing with variable document roots with apache 2, and have defined a virtual host following what appear to be all of the rules from apache.org.

    I've created a virtual host called churchCMS. In my /etc/hosts file I've added the line 127.0.0.1 churchCMS just below the 127.0.0.1 localhost line. When I open Safari and type http://churchCMS/ I expect to be taken to the document root specified in the virtual host portion of the httpd.conf file. Instead I get a server not found error.

    Any suggestions?

  2. #2
    StarManta
    Guest
    when you type http://churchCMS/ Safari is probably thinking you want churchCMS.com, which i bet doesn't exist. At least that's my guess.

  3. #3
    jleecbd
    Guest
    Quote Originally Posted by StarManta
    when you type http://churchCMS/ Safari is probably thinking you want churchCMS.com, which i bet doesn't exist. At least that's my guess.
    No. Even dumber than that. I had defined the host as churchCMS in the hosts file, but Safari rendered it as churchcms, which wasn't recognized. BTW churchcms.com is a real domain.

  4. #4
    Virtual Hosts Locally
    Murlyn's Avatar
    Member Since
    Jun 11, 2003
    Location
    Mount Vernon, WA
    Posts
    4,915
    Specs:
    MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
    What I do is add a virtualhost container in my /etc/httpd/httpd.conf file and I give my domains on my system my own extension.. so www.churchcms.my or www.churchcms.loc and then you also have to get into "NetInfo Manager" in your utilities folder. Click on "machines" duplicate your "localhost" config, oh and make sure to authorize by clicking on the lock icon. after duplicating the localhost, select the duplicate and in the bottom pane double click on name field and type in www.churchcms.loc restart apache and that should take care of it!

    Cheers!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. using virtual hosts instead of port numbers
    By banjomacman in forum Web Design and Hosting
    Replies: 0
    Last Post: 12-15-2011, 09:20 AM
  2. Mail: storing messages locally
    By OnceYouGoMac in forum Switcher Hangout
    Replies: 2
    Last Post: 03-20-2010, 07:13 PM
  3. 'Mono' - Test ASP locally on a Mac?
    By Liam in forum Web Design and Hosting
    Replies: 2
    Last Post: 01-22-2009, 03:15 PM
  4. Virtual hosts
    By mikeeeo_o in forum Web Design and Hosting
    Replies: 4
    Last Post: 01-01-2009, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •