Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Subsites Setting up Virtual Hosts on WAMP, internal sever error


Go to End


5 Posts   8467 Views

Avatar
TF-35Lightning

Community Member, 137 Posts

4 May 2010 at 4:06pm

Edited: 04/05/2010 4:06pm

Hi all,

Hoping someone might be able to help me out with setting up Virtualhost on WAMP I've ran through multiple tutorials but I always get Internal Server Error when I access the URL.

I have ran through this tutorial
http://www.infinitedesigns.org/archives/217

Basically it says to edit:

#1
C:\Windows\system32\drivers\etc\hosts
with
add this line (in my case url will be http://mysilverstripe)

127.0.0.1 mysilverstripe

#2
edit httpd.conf:
uncomment the line
#Include conf/extra/httpd-vhosts.conf

so that it includes the file
eg:
Include conf/extra/httpd-vhosts.conf

#3
edit conf/extra/httpd-vhosts.conf
add the following (f:/wamp/www/silverstripe/silverstripe-v2.4.0-rc2 is the root directory I am trying to point/map to, it says to only add the <directory> part if the site is outside of wamp/www, I have tried having it both in and out, but get the same error.)

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "f:/wamp/www"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "f:/wamp/www/silverstripe/silverstripe-v2.4.0-rc2"
ServerName mysilverstripe
ErrorLog "logs/mysilverstripe.log"
CustomLog "logs/mysilverstripe.log" common
<directory "f:/wamp/www/silverstripe/silverstripe-v2.4.0-rc2">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</directory>

I always get

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Hoping someone might be able to help me out with this, desperate to get subsites all up and functional.

Any help would be much appreciated.

Avatar
TF-35Lightning

Community Member, 137 Posts

4 May 2010 at 5:17pm

Edited: 04/05/2010 5:17pm

my logs/mysilverstripe.log error log shows

127.0.0.1 - - [04/May/2010:15:03:17 +1000] "GET / HTTP/1.1" 500 539
[Tue May 04 15:03:26 2010] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

Not sure where to go now.

Avatar
TF-35Lightning

Community Member, 137 Posts

4 May 2010 at 6:39pm

as soon as I have removed the line

RewriteBase

from my .htaccess this error has now gone away. Subsite subdomain still not working however, I'll continue that back over at my original post
http://www.silverstripe.org/general-questions/show/282949?showPost=283583

Avatar
DL

Community Member, 13 Posts

8 May 2010 at 7:05am

All you need in the httpd-vhosts.conf file is this:

1) make sure that near the top of the file you have this:
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

2) And then later you should have this:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "f:/wamp/www/silverstripe/silverstripe-v2.4.0-rc2"
ServerName mysilverstripe
ErrorLog "logs/mysilverstripe.log"
CustomLog "logs/mysilverstripe.log" common
</VirtualHost>

Forget all of that <directory> stuff - remove it.
And also, in your .htaccess file, make sure that RewriteBase is set to /

That should do it, dude.

Avatar
virat.gaywala

Community Member, 1 Post

6 May 2014 at 6:31pm

Hi,

For detailed and step by step information on how to set up virtualhosts check this http://viratgaywala.blogspot.in/2014/05/how-to-set-up-virtualhost-using-wamp.html?view=sidebar

Thanks
Virat Gaywala