Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 12, 2012, 04:25 AM   #1
bwan37
macrumors newbie
 
Join Date: Oct 2012
Question about NameVirtualHost

Hi, I have my web server up and running with with TCP:80 all setup,
but now I have got another problem when dealing with virtualHost

here's my mission:
www.ben-wan.com point to /WebServer/benwan
www.irisecret.com point to /WebServer/irissecret

my problem.
www.ben-wan.com goes to /WebServer folder.

here's my actual config files....

#inside /private/etc/apache2/httpd.conf
ServerName www.ben-wan.com:80
DocumentRoot "/volumes/storage/WebServer"
Include /private/etc/apache2/extra/httpd-vhosts.conf

#inside /private/etc/apache2/extra/httpd-vhost.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.ben-wan.com
ServerAlias *.ben-wan.com
DocumentRoot "/WebServer/benwan"
ServerSignature Off
# ErrorLog "/WebServer/benwan/log/ben-wan.com-error_log"
# CustomLog "/WebServer/benwan/log/ben-wan.example.com-access_log" common
<Directory "/WebServer/benwan">
Options Indexes FollowSymLinks SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
<Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName www.irisecret.com
ServerAlias *.irisecret.com
DocumentRoot "/WebServer/irissecret"
ServerSignature Off
# ErrorLog "/WebServer/benwan/log/irissecret.com-error_log"
# CustomLog "/WebServer/benwan/log/irissecret.example.com-access_log" common
<Directory "/WebServer/irissecret">
Options Indexes FollowSymLinks SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
<Directory>
</VirtualHost>

#inside /private/etc/host/hosts
127.0.0.1 ben-wan.com
127.0.0.1 irisecret.com

Can someone give me a hand in solving this problem.
Thanks a great deal.
bwan37 is offline   0 Reply With Quote
Old Oct 12, 2012, 05:13 AM   #2
assembled
macrumors regular
 
Join Date: Jan 2009
Location: London
you've given the default server the same host header

here's my actual config files....

#inside /private/etc/apache2/httpd.conf
ServerName www.ben-wan.com:80
DocumentRoot "/volumes/storage/WebServer"

try

#inside /private/etc/apache2/httpd.conf
ServerName webserver
DocumentRoot "/volumes/storage/WebServer"
assembled is offline   0 Reply With Quote
Old Oct 12, 2012, 07:57 AM   #3
bwan37
Thread Starter
macrumors newbie
 
Join Date: Oct 2012
I have changed www.ben-wan.com to webserver
but may I know what this does?
cause I try typing http://webserver but it return "cannot find server webserver"

can I put in "ServerName 127.0.0.1:80" instead?

"btw, problem solved for this code..

<VirtualHost *:80>
....
<Directory "...">
...
<Directory> <---- Need to close this...
</VirtualHost>
bwan37 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Mophie Juice Pack Plus (iPhone 5) Question - Mute Button Question JulesK iPhone Accessories 3 Mar 30, 2014 02:58 PM
Snow Leopard File Vault Question and Basic System Password Question & Time Machine? GordonGekko999 Mac Basics and Help 0 Oct 25, 2013 06:06 AM
Question for anyone who has seen or owns the pink ipod nano? Color deciding question. Pinkstiletto66 iPod 4 Apr 4, 2013 12:57 PM
Family Share Question, Upgrade Question, Argh head hurting.. Jazwire iPhone 1 Sep 14, 2012 12:19 AM
Time Capsule - Newbie Question Wifi Question Alper1234 Mac Peripherals 1 Jun 23, 2012 09:17 AM

Forum Jump

All times are GMT -5. The time now is 11:25 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC