Re: [users@httpd] dynamic virtual hosts

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

 



On 5/2/05, James Nicolson <jlnicolson@xxxxxxxxxxx> wrote:
> 
>  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.  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
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.  For the logging, you should log
everything to one file and split it out later based on the recorded
vhost name.

>  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.

>  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.

---------------------------------------------------------------------
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