Apache Virtual Host Problem

  • nrodes
  • Born
  • Born
  • No Avatar
  • Joined: Nov 25, 2008
  • Posts: 3
  • Status: Offline

Post November 25th, 2008, 4:32 pm

I installed Wamp Server 2 on my computer. I succesfully hosted one website. I found directions to setup virtual hosts. Now neither of my websites work.

Virtual host config:
Quote:
NameVirtualHost 192.168.0.140:80

<VirtualHost 192.168.0.140:80>
ServerName http://www.soaringserver.com
DocumentRoot C:/wamp/www/soaringserver
ErrorLog C:/wamp/www/soaringserver/logs/error.log
CustomLog C:/wamp/www/soaringserver/logs/access.log common
</VirtualHost>

<VirtualHost 192.168.0.140:80>
ServerName http://www.najisite.com
DocumentRoot C:/wamp/www/najisite
ErrorLog C:/wamp/www/najisite./logs/error.log
CustomLog C:/wamp/www/najisite/logs/access.log common
</VirtualHost>


Here is my hosts file:
Quote:
127.0.0.1 localhost
127.0.0.1 soaringserver.com
127.0.0.1 http://www.soaringserver.com
127.0.0.1 najisite.com
127.0.0.1 http://www.najisite.com


does anyone know whats wrong?

thanks for any help :)
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 25th, 2008, 4:32 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post November 25th, 2008, 5:04 pm

Tell us about what you did, start from the beginning and spare no details.
Strong with this one, the sudo is.
  • nrodes
  • Born
  • Born
  • No Avatar
  • Joined: Nov 25, 2008
  • Posts: 3
  • Status: Offline

Post November 25th, 2008, 6:08 pm

Ok, first I bought a domain name, najisite.com. Then I downloaded Abyss Web Server. My website didn't work remotely so I configured my router with a virtual server to forward requests to my computer. A little while later I decided I wanted to put a forum on najisite.com. I had already setup php with Abyss. I tried to setup MySQL but it was very difficult and everybody told me it was a waste of time. I uninstalled Abyss and installed Wamp Server 2, free php, apache & MySQL server software. This worked fine. Some of my friends wanted websites so I thought maybe I could setup name-based virtual hosts. I bought soaringserver.com as a place for people to go to edit their websites and also as a test for the virtual hosting. I found directions(http://guides.jlbn.net/setvh/setvh1.html) for virtual hosts made specifically for Wamp Server 2 and I followed them. It gave me a FORBIDDEN error. I changed different parts of what it told me to do thinking maybe they had made a mistake. It still didn't work. I went to severaal different forums asking for help and nobody seemed to know what was wrong. I found this forum with a google search and here I am.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post November 25th, 2008, 7:00 pm

"Forbidden" errors are usually a problem with permissions for one of the folders Apache (yes wamp is using Apache) needs to use.

Did you copy/paste those virtualhost containers directly from your configuration ?

I can see a likely typo in one line. Note the period/dot after the word "najisite".
Code: [ Select ]
ErrorLog C:/wamp/www/najisite./logs/error.log


What doesn't make sense is that both sites would give you a forbidden error after adding a second virtual host. :scratchhead:
Strong with this one, the sudo is.
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Joined: Jan 23, 2004
  • Posts: 2673
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Post November 26th, 2008, 11:24 am

"It's always a long day, 86,400 won't fit into a short."
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post November 26th, 2008, 11:40 am

Those ServerName directive looked odd to me too, but sure enough,

http://httpd.apache.org/docs/2.2/mod/co ... servername
Code: [ Select ]
Syntax: ServerName [scheme://]fully-qualified-domain-name[:port]
Strong with this one, the sudo is.
  • nrodes
  • Born
  • Born
  • No Avatar
  • Joined: Nov 25, 2008
  • Posts: 3
  • Status: Offline

Post November 26th, 2008, 2:14 pm

Thanks for everyone's suggestions. I've used all of them and I still get the same error. I'd still appreciate suggestions, I'm just letting you guys know that none of them work so far.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 46 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.