Forum Moderators: phranque

Message Too Old, No Replies

Help with wildcard subdomains

Accessing failing with a 'Forbidden" error

         

islandlizard

3:50 pm on Dec 23, 2005 (gmt 0)

10+ Year Member



OK< Am trying to set up some dynamic subdomains. I don't need rewrite help, as this will all be done by PHP I hope.

So, in my httpd.conf file I have:


<VirtualHost 111.222.333.444:80>
ServerName www.example.com
ServerAdmin support@example.com
DocumentRoot "/Path/to/example.com/"
DirectoryIndex index.html index.php
<Directory "/Path/to/example.com/">
Options All +MultiViews -ExecCGI -Indexes
AllowOverride None
</Directory>
</VirtualHost>

This is for the core 'www' access point, and works fine.

Then I have:


<VirtualHost 111.222.333.444:80>
ServerName *.example.com
ServerAdmin support@example.com
DocumentRoot "/Path/to/example.com/special/"
DirectoryIndex index.html index.php
<Directory "/Path/to/example.com/special/">
Options All +MultiViews -ExecCGI -Indexes
AllowOverride None
</Directory>
</VirtualHost>

to allow access to foo.example.com and bar.example.com. the default page in the/special/ directory will then work out what the prefix was and serve the necessary info based on it. Well, in theory at least!

Unfortunately, hitting either of these sub domains gives 403 Forbidden error.

Any clues as to what I'm doing wrong?

[edited by: jdMorgan at 6:23 pm (utc) on Dec. 23, 2005]
[edit reason] Example.com [/edit]