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

Re: NameVirtualHost and dynamic subdomains on apache.



thanks for the quick reply.
I have to have a soft link like ln -s /var/www/html/websites/XXX.com rid.XXX.com

Is this the only way ?????
I have seen many sites out there that make the subdomain a keyword in order to get higher in Search engine rankings.

Can someone else back this up....

Steve on :
http://www.debian-administration.org/articles/412#comment_36
thinks that is all you need....I tried and tried..but there seems to be a no go on the directory resolving.

thanks
mjh



On Tue, Apr 1, 2008 at 12:07 PM, Matthew Macdonald-Wallace <mmw@tiger-computing.co.uk> wrote:
On Tue, 1 Apr 2008 11:58:24 -0400
"Michael Habashy" <mjh2000@gmail.com> wrote:

> i had created this file called www.XXX.com and placed it into the
> /etc/apache2/sites-available directory.
> <VirtualHost *>
>         ServerAdmin webmaster@XXX.com
>         ServerName  XXX.com
>         ServerAlias *.XXX.com
>
>         # Indexes + Directory Root.
>         DirectoryIndex index.php index.html
>         DocumentRoot /var/www/html/websites/XXX.com/public_html/
>
>         # CGI Directory
>         #
> ScriptAlias /cgi-bin/ /var/www/html/websites/XXX.com/cgi-bin/ #
> <Location /cgi-bin> #         Options +ExecCGI
>         # </Location>
>
>
>         # Logfiles
>         ErrorLog  /var/log/apache2/www.XXX.com/logs/error.log
>         CustomLog /var/log/apache2/www.XXX.com/logs/access.log
> combined </VirtualHost>


Using a *.XXX.com won't work.  You need to define a virtual host for
each and every website on your server including all sub-domains and
then place the files in the appropriate directories.

Once you have the configuration files in place, execute

a2ensite $sitename$

and then reload Apache

/etc/init.d/apache2 reload

Hope this helps,

Matt.

--
|Matthew Macdonald-Wallace
|Tiger Computing Ltd
|"The Linux Specialists"
|
|Tel: 0330 088 1511
|Web: http://www.tiger-computing.co.uk
|
|Registered in England. Company number: 3389961
|Registered address: Wyastone Business Park,
| Wyastone Leys, Monmouth, NP25 3SR


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: