logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_vd available
Author
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3094
Location: Hilversum, NL, EU

PostPosted: Thu 29 Jun '06 17:04    Post subject: mod_vd available Reply with quote

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

PostPosted: Mon 03 Jul '06 17:49    Post subject: doesn't seem to work Reply with quote

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: 3094
Location: Hilversum, NL, EU

PostPosted: Mon 03 Jul '06 18:04    Post subject: Reply with quote

Did you defined :
VdChopPrefix
VdChopSuffix
VdPathPrefix
VdPathSuffix
Question

Steffen
Back to top
DeliriumServers



Joined: 17 Jun 2006
Posts: 54
Location: H Town

PostPosted: Mon 03 Jul '06 18:10    Post subject: Reply with quote

<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: 3094
Location: Hilversum, NL, EU

PostPosted: Mon 03 Jul '06 18:15    Post subject: Reply with quote

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

PostPosted: Mon 03 Jul '06 18:27    Post subject: Reply with quote

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

PostPosted: Mon 03 Jul '06 20:58    Post subject: doesn't work Reply with quote

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

PostPosted: Wed 12 Jul '06 3:50    Post subject: ideas? Reply with quote

any ideas?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3094
Location: Hilversum, NL, EU

PostPosted: Wed 12 Jul '06 12:03    Post subject: Reply with quote

I am wondering if you really need mod_vd, its use is when you have a huge number of virtual hosts (mass virtual hosting).

Maybe you can just use the ServerAlias directive, see http://httpd.apache.org/docs/2.2/mod/core.html#serveralias

Steffen
Back to top
SMc



Joined: 12 Feb 2006
Posts: 17
Location: Chelmsford, UK

PostPosted: Wed 12 Jul '06 13:54    Post subject: Reply with quote

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

PostPosted: Thu 20 Jul '06 23:26    Post subject: works now Reply with quote

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: 3094
Location: Hilversum, NL, EU

PostPosted: Thu 20 Jul '06 23:39    Post subject: Reply with quote

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

PostPosted: Sat 22 Jul '06 8:16    Post subject: works Reply with quote

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

PostPosted: Mon 31 Jul '06 22:42    Post subject: Reply with quote

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


Reply to topic   Topic: mod_vd available View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules