| | |
httpd-vhosts.conf isn't accepting new vertual hosts!
Thread Solved
![]() |
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?)
Here is what I've added:
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
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
I figured it out. I had to add the new virtual domains to the "hosts" file located in /private/etc.
Now it all works!
Now it all works!
![]() |
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: Apache server - prevent outside access
- Next Thread: HTTP Auth (.htpasswd) Not Working In CGI-BIN
| Thread Tools | Search this Thread |
.net apache asus bbc bluegene centos cisco citrix cloud cloudcomputing datacenters debian dell desktops development distributions distros drivers economy eeepc energy enterprise fedora gadgets gentoo gos government gpl hardware hp hyper-v ibm java jobs kindle knoppix kvm laptop laptops lawsuits licensing limo linustorvalds linux linuxfoundation linuxmagazine magazines microserver microsoft mobile mobilephones netbook netbooks news novell olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc pcworld plathome politics print qumranet redhat rhel robot russia sco server servers slackware software solaris source sun supercomputer support tivo torvalds tradeshows training tv ubuntu umpc unix virtualization vmware windows x86 xandros xen





