Re: Re: [users@httpd] dynamic virtual hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >>  I am trying to setup a dynamic virtual hosting
> >>  configuration. I have used traditional virtual
> >>  hosting
> >>  for a long time and have repeated tried to move
> to
> >>  dynamic virtual hosting with no success, I have
> read
> >> the documentation time and time again. I am
> >>  using apache 2.0.53
> >> 
> >>  I would like a setup like the following...
> however
> I
> >> am not sure whether apache supports/how you write
> >>  such
> >>  a configuration
> >> 
> >>  <VirtualHost 192.168.1.1>
> >>  VirtualDocumentRoot /var/www/%0/htdocs>
> 
> 
> What is the ">" doing on the end of that?
> 
> 
> >>  ServerName %0
> >>  ServerAlias www.%0
> >>  CustomLog /var/www/%0/logs/access_log vhost_mod
> 
> 
> These are all wrong.  You can't use the %
> substitution
> things in
> arbitrary directives.  
Yes I know they are wrong... I was using them as an
explanation of what I wanted...

>They can only be used in the
> directives
> provided by mod_vhost_alias.  It appears you need to
> spend some time
> reading
> http://httpd.apache.org/docs-2.0/vhosts/mass.html

I've read that many times.... I cant even get the
simple configuration such as beneath working

VirtualDocumentRoot /var/www/%0/htdocs
VirtualScriptAlias /var/www/%0/cgi-bin 

so why does that not work??? my traditional vhost
setup is as follows and that works fine.... why not
the above? yet it will do whats below:

<VirtualHost 192.168.2.103 *:80>
ServerName mail.mydomain.biz
ScriptAlias /cgi-bin/
/var/www/mail.mydomain.biz/cgi-bin/
DocumentRoot /var/www/mail.mydomain.biz/htdocs
CustomLog /var/www/mail.mydomain.biz/logs/access_log
vhost_mod
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</VirtualHost>    

> In general, ServerName can be relatively arbitrary
> and
> ServerAlias
> doesn't need to be used unless you are combining
> dynamic vhosting with
> ordinary name-based vhosting.  In order to get the
> effect of
> www.example.com and example.com going to the same
> place, you should
> use symbolic links in the filesystem.

I was wondering if there was a way to do it without
symbolic links

> For the
> logging, you should log
> everything to one file and split it out later based
> on
> the recorded
> vhost name.

Thanks

> 
> 
> >>  RewriteEngine on
> >>  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
> >>  RewriteRule .* - [F]
> 
> 
> This Rewrite stuff is unimportant and is only needed
> if you want to
> satisfy the whims of your vulnerability tester.
>

but if I dont have it I get a forbidden access
message???
 
> 
> >>  the main problem however is that even with a
> simple
> >>  configuration attempt I get forbidden access
> message
> >>  all the time.
> 
> 
> Start by fixing the above problems, then look at the
> error log if you
> still get error messages.
> 
> Joshua.
> 

Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux