Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Apr 19, 2010 11:24 pm 
Offline
Junior Member
User avatar

Joined: Thu Sep 03, 2009 10:47 pm
Posts: 35
Website: http://www.kavoir.com/
So I have written a configuration file and activated it / reloaded Apache2:

Code:
<VirtualHost *:80>
  ServerAdmin my@email.com
  ServerName  *.mydomain.com

  DocumentRoot /home/xx/mydomain.com/.sub
  <Directory />
    Options Indexes SymLinksIfOwnerMatch
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>

  ErrorLog  /home/xx/logs/error.log
  CustomLog /home/xx/logs/access.log combined
</VirtualHost>


When I visit whatever.mydomain.com, it still gives me this error:

Code:
Forbidden

You don't have permission to access / on this server.


What am I doing wrong? Thanks!

_________________
I have a passion for building websites. I love Usable Databases.


Top
   
 Post subject:
PostPosted: Mon Apr 19, 2010 11:46 pm 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
As far as I can gather, if you're going to use wildcard hostnames (*.example.com), you must specify one of them in ServerName, and then use the wildcard in ServerAlias.

It doesn't seem like ServerName supports the use of wildcards. ServerAlias does, though.

Second, make sure your home directory (as well as subdirectories and files in the tree in it) is readable by the user and group Apache runs as (it's usually www-data or apache for both the user and the group).


Top
   
 Post subject:
PostPosted: Tue Apr 20, 2010 2:25 am 
Offline
Junior Member
User avatar

Joined: Thu Sep 03, 2009 10:47 pm
Posts: 35
Website: http://www.kavoir.com/
NeonNero wrote:
As far as I can gather, if you're going to use wildcard hostnames (*.example.com), you must specify one of them in ServerName, and then use the wildcard in ServerAlias.

It doesn't seem like ServerName supports the use of wildcards. ServerAlias does, though.

Second, make sure your home directory (as well as subdirectories and files in the tree in it) is readable by the user and group Apache runs as (it's usually www-data or apache for both the user and the group).


Thanks a lot, Neon. That does the trick. :)

_________________
I have a passion for building websites. I love Usable Databases.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group