Author |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3093 Location: Hilversum, NL, EU
|
Posted: Thu 29 Jun '06 17:04 Post subject: mod_vd available |
|
|
On request I made mod_vd for Apache 2.2 available here at the apache lounge.
It is module to map the request hostname (eg. john.smith.foo.com) to a directory. A fast variation of mod_vhost_alias.
For details, see http://www.snert.com/Software/mod_vd/index.shtml .
Steffen |
|
Back to top |
|
DeliriumServers
Joined: 17 Jun 2006 Posts: 54 Location: H Town
|
Posted: Mon 03 Jul '06 17:49 Post subject: doesn't seem to work |
|
|
Well I got it installed I think. But it doesn't seem to work. I'm sure I'm missing something :-/
Well I used apache2.2.2 straight from the download page. I added these things to the conf file, but otherwise apache is vanilla.
LoadModule vd_module modules/mod_vd.so
<IfModule vd_module>
VdEnable on
</IfModule>
then I made a few folders with different domains I have pointed at my server, but they all resolve to the documentsroot folder and I can't get them to go anywhere else.
Thanks for all the help! |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3093 Location: Hilversum, NL, EU
|
Posted: Mon 03 Jul '06 18:04 Post subject: |
|
|
Did you defined :
VdChopPrefix
VdChopSuffix
VdPathPrefix
VdPathSuffix
Steffen |
|
Back to top |
|
DeliriumServers
Joined: 17 Jun 2006 Posts: 54 Location: H Town
|
Posted: Mon 03 Jul '06 18:10 Post subject: |
|
|
<IfModule vd_module>
VdEnable on
VdChopPrefix 0
VdChopSuffix 0
VdPathPrefix F:/www
VdPathSuffix www
</IfModule>
I added that and no difference. I did restart it.
is there someway that you tell apache not to send everything to the document root? Like tell it look for virtual hosts only? |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3093 Location: Hilversum, NL, EU
|
Posted: Mon 03 Jul '06 18:15 Post subject: |
|
|
By defining VdChopPrefix 0 and VdChopSuffix 0, looks to me that you are not on the good track. At the above snert.com link is a very good desription what you must define.
Not sure what you want to achieve.
Steffen |
|
Back to top |
|
DeliriumServers
Joined: 17 Jun 2006 Posts: 54 Location: H Town
|
Posted: Mon 03 Jul '06 18:27 Post subject: |
|
|
It looks like I can make it work like this
<IfModule vd_module>
VdEnable on
VdChopSuffix 1
VdChopPrefix 1
VdPathPrefix F:/www
</IfModule>
but then my .net and .com domains with the same name resolve to the same folder. when vd chop suffix is zero the mod doesn't seem to work. I'd like to be able to simply make a folder for deliriumservers.com deliriumservers.net bahamarobs.com and they auto map. |
|
Back to top |
|
DeliriumServers
Joined: 17 Jun 2006 Posts: 54 Location: H Town
|
Posted: Mon 03 Jul '06 20:58 Post subject: doesn't work |
|
|
the mod doesn't seem to work unless vdchopsuffix is something other than 0. I really need this to be zero so that .net and .com domains don't resolve to the same folder. Also, I need someway so that www.deliriumservers.com and deliriumservers.com resolve to the same folder.
thanks for all the help! |
|
Back to top |
|
DeliriumServers
Joined: 17 Jun 2006 Posts: 54 Location: H Town
|
Posted: Wed 12 Jul '06 3:50 Post subject: ideas? |
|
|
any ideas? |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3093 Location: Hilversum, NL, EU
|
|
Back to top |
|
SMc
Joined: 12 Feb 2006 Posts: 17 Location: Chelmsford, UK
|
Posted: Wed 12 Jul '06 13:54 Post subject: |
|
|
Hi,
...just looking at the documentation steffen listed, isnt what you want:-
<IfModule vd_module>
VdEnable on
VdChopPrefix 0
VdChopSuffix 1
VdPathPrefix F:/www
</IfModule>
This will keep the net or com part of the domain and remove the www
e.g. f:/www/com/deliriumservers/............
and f:/www/net/deliriumservers/............
Regards,
SMc |
|
Back to top |
|
DeliriumServers
Joined: 17 Jun 2006 Posts: 54 Location: H Town
|
Posted: Thu 20 Jul '06 23:26 Post subject: works now |
|
|
Hmm I'm not sure exactly what happened, I must have missed something. But it works now!
Thanks alot everyone!
I'm using this with the devside.net WAMP package, will this being compiled in vs 2005 interfere with my package being c++ 6.0? |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3093 Location: Hilversum, NL, EU
|
Posted: Thu 20 Jul '06 23:39 Post subject: |
|
|
Good to hear.
Can you post you final vd config ? thanks.
When you installed the Visual C++ 2005 Redistributable Package and copied the httpd.exe.manifest to the /apache/bin/folder, then it should work.
Steffen |
|
Back to top |
|
DeliriumServers
Joined: 17 Jun 2006 Posts: 54 Location: H Town
|
Posted: Sat 22 Jul '06 8:16 Post subject: works |
|
|
well it works for me like this:
<IfModule vd_module>
VdEnable on
VdChopPrefix 0
VdChopSuffix 0
VdPathPrefix F:/www/webroot
</IfModule>
so http://deliriumservers.com is mapped to F:/www/webroot/com/deliriumservers
and http://deliriumservers.com is mapped to F:/www/webroot/net/deliriumservers
now all I need is a rewrite rule that will redirect http://www. requests to plain http://
any ideas?
thanks, I appreciate it! |
|
Back to top |
|
DeliriumServers
Joined: 17 Jun 2006 Posts: 54 Location: H Town
|
Posted: Mon 31 Jul '06 22:42 Post subject: |
|
|
here's what works for me!!
you can put this inside your httpd.conf plain or in a virtual host, whatever, but get the rewrite rule ahead of mod_vd
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule (.*) http://www.%{HTTP_HOST}$1 [R=301,L]
<IfModule vd_module>
VdEnable on
VdChopPrefix 1
VdChopSuffix 0
VdPathPrefix F:/www/webroot
</IfModule>
And it works!!!!! If there is no www, then it adds it, if there is it leaves it alone. With mod_vd set to just eat the www, everything works great!! |
|
Back to top |
|