Tony Ser wrote:
Hi,

We are developing a web application and need to create a website.
The testsite.conf contains

Namevirtualhost *:80
<VirtualHost *:80>

ServerName ?????

AllowEncodedSlashes On

DocumentRoot ????  ----|
                       |
                       v

Alias /testsite "/var/www/company/yyy/public"
<Directory "/var/www/company/yyy/public">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


We don't want to specify a fix IP Address, so we leave it with *.
This works fine under Apache 2.2.8 (in Ubuntu 8.04)
You mean the above config ? or just the "*" ?

However, under Apache 2.2.11 (in Ubuntu 9.04), the settings are not
ineffect.

If we browse http://localhost/testsite/test.html, error log shows apache
trying to access /var/www/testsite/test.html instead of
/var/www/company/yyy/public/test.html

Probably only because your main configuration says
DocumentRoot /var/www
and by default, it carries over to the <VirtualHost>

If I add "ServerName localhost", then it will work.

If that's the only thing you're adding, then you're lucky.

Is there a way specify a site configuration (i.e. AllowEncodedSlashes,
Alias, etc) with out specifying a fixed IP Address or fixed ServerName.


If you have only one <VirtualHost> section, then it does not matter what
you give it as ServerName.  Pages will always be served by this VirtualHost,
because it will be the default one.

As for fixed IP address, I don't really understand what you mean.
For that, it seems that your configuration above is fine. This Apache will respond to any request that reaches it on port 80, no matter through which one of its (possible) IP addresses.


I believe you might benefit from reading through
http://httpd.apache.org/docs/2.2/vhosts/
and try to get a basic understanding of this stuff first.

---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to