Re: domain mixed up problem

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

 



J. Bakshi wrote:

Hello,

I have found the problem. "apachectl -S" shows that domain.1 has ben
taken as default server. hence it automatically goes to the default one
when It can't match the url. I have created another vhost configuration
file which is named as  a.conf  and in that file I have  configured to
read an index.php file which simply shows "nothing to see here". I have
named it as a.conf as apache make the configuration as default server
whose configuration it gets first (as alphabetically).  Now this a.conf
has become the default server and when ever I put any wrong
subdomain.domain combination it shows "nothing to see here".

Bye

> Dear list,
>
> I  have a remote server with 2 different domain pointing to the same
> server. I have configured some vhosts for these 2 domains. But I have
> found that the vhosts are working for both the domains. For an example
> say I have two domains  domain1.com  and  domain2.com
>
> Now two vhosts are site1.domain1.com   and   site2.domain2.com
>
> Now if you exchange the domains like site1.domain2.com it still works as
> before ( site1.domain1.com )
> How can I restrict this behavior so that  site1.domain1.com works but 
> site1.domain2.com not ?
>
> Here are my vhost configuration
>
> ## site1 on domain1
> NameVirtualHost  site1.domain1.com:80
>
> <VirtualHost  site1.domain1.com:80>
> ServerName http://www.site1.domain1.com
> ServerAlias http://ble.site1.domain1.com
>
> DocumentRoot /srv/www/htdocs/site1
>
> DirectoryIndex index.php
>
> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
> <Directory "/srv/www/htdocs/site1/">
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Options None
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
> ## site2 on domain2
> NameVirtualHost  site2.domain2.com:80
>
> <VirtualHost  site2.domain2.com:80>
> ServerName http://www.site2.domain2.com
> ServerAlias http://site2.domain2.com
>
> DocumentRoot /srv/www/htdocs/site2
>
> DirectoryIndex index.php
>
> ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
> <Directory "/srv/www/htdocs/site2/">
> Options Indexes FollowSymLinks MultiViews
> AllowOverride All
> Options None
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
>
> ---------------------------------------------------------------------
> 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
>
>
>   


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