943,879 Members | Top Members by Rank

Sep 3rd, 2008
0

httpd-vhosts.conf isn't accepting new vertual hosts!

Expand Post »
I've hit a bit of a block and need some help.

I have already set up my httpd.conf file to enable Virtual Hosts. I also set up httpd-vhosts.conf with a bunch of vitual hosts. I've been using them and they work fine (this is on my dev machine, not a live server.)
I started working on a new site. The first thing I did was set up a virtual host for it on my dev machine so I can navigate to it in my browser and test it quickly and easily.
The browsers won't find it! What could I be doing wrong? The following is my old httpd-vhosts.conf.
(Sorry for the long code snippets, but maybe seeing what I'm using will help solve my problem?)

NameVirtualHost 127.0.0.1:80

# Localhost
<VirtualHost 127.0.0.1:80>
    ServerName localhost
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev"
</VirtualHost>


# BowandCello.dev
<VirtualHost 127.0.0.1:80>
    DocumentRoot "/Developer/WebDev/bowandcello.com/www"
    ServerName bowandcello.dev
</VirtualHost>


# CenterForTraditionalMedicine.dev
<VirtualHost 127.0.0.1:80>
    ServerName CenterForTraditionalMedicine.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/CWIS/CenterForTraditionalMedicine.org/public"
</VirtualHost>


# CWIS.dev
<VirtualHost 127.0.0.1:80>
    ServerName cwis.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/CWIS/cwis.org"
</VirtualHost>


# DaveeC.dev
<VirtualHost 127.0.0.1:80>
    ServerName daveec.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/daveec.com/www"
</VirtualHost>


# DianoGarcia.dev
<VirtualHost 127.0.0.1:80>
    ServerName dianogarcia.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/dianogarcia.com/www"
</VirtualHost>


# digRecords.dev
<VirtualHost 127.0.0.1:80>
    DocumentRoot "/Developer/WebDev/digrecords.com/www"
    ServerName digrecords.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
</VirtualHost>


# GretchenYanover.dev
<VirtualHost 127.0.0.1:80>
    ServerName gretchenyanover.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/gretchenyanover.com/www"
</VirtualHost>


# HealthAlt.dev
<VirtualHost 127.0.0.1:80>
    ServerName healthalt.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/CWIS/HealthAlt.org/html"
</VirtualHost>


# JonRyser.dev
<VirtualHost 127.0.0.1:80>
    ServerName jonryser.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/jonryser.com"
</VirtualHost>

  <VirtualHost 127.0.0.1:80>
      ServerName comics.jonryser.dev
    
      # Indexes + Directory Root.
      DirectoryIndex index.html index.php
      DocumentRoot "/Developer/WebDev/jonryser.com/comics.jonryser.com/public"
  </VirtualHost>


# LummiFutures.dev
<VirtualHost 127.0.0.1:80>
    ServerName lummifutures.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/CWIS/LummiFutures.com/www"
</VirtualHost>


# Scalfati.dev
<VirtualHost 127.0.0.1:80>
    ServerName scalfati.dev
    
    # Indexes + Directory Root.
    DirectoryIndex index.html index.php
    DocumentRoot "/Developer/WebDev/scalfati.old/public"
</VirtualHost>

Here is what I've added:

<VirtualHost 127.0.0.1:80>
      ServerName scadmin.dev

      # Indexes + Directory Root.
      DirectoryIndex index.html index.php
      DocumentRoot "/Developer/WebDev/scadmin.dev/public"
  </VirtualHost>

No matter where I put it in relation to the other virtual host blocks, once I restart apache and look up scadmin.dev in my browser, I get a server not found error.

Any thoughts and help is greatly appreciated!

Cheers
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bigtalk is offline Offline
16 posts
since Aug 2007
Jan 28th, 2009
0

Re: httpd-vhosts.conf isn't accepting new vertual hosts!

I figured it out. I had to add the new virtual domains to the "hosts" file located in /private/etc.
Now it all works!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bigtalk is offline Offline
16 posts
since Aug 2007
Feb 2nd, 2009
0

Re: httpd-vhosts.conf isn't accepting new vertual hosts!

It good to know that you were able to find the solution on your own. Good Job!
Keep it up.
Reputation Points: 7
Solved Threads: 7
Junior Poster
WebDave is offline Offline
135 posts
since Sep 2007
Apr 20th, 2009
0

Re: httpd-vhosts.conf isn't accepting new vertual hosts!

Click to Expand / Collapse  Quote originally posted by WebDave ...
It good to know that you were able to find the solution on your own. Good Job!
Keep it up.
Thanks for the support! I'm just doin' what I can.

Cheers,
BigTalk
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bigtalk is offline Offline
16 posts
since Aug 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Servers and Apache Forum Timeline: Apache server - prevent outside access
Next Thread in Linux Servers and Apache Forum Timeline: HTTP Auth (.htpasswd) Not Working In CGI-BIN





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC