trouble with virtualhost in http/https

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

 



Hi,

i have some issues with virtualhosts in http and https on windows 7.
basically i have 2 virtualhost using http/https and setup as following:

[code]#--------------------------
# website1 with Joomla 2.5
#--------------------------
<VirtualHost *:80>
  DocumentRoot "d:/webserver/www/website1"
  ServerName website1.loc
  ServerAlias www.website1.loc
  ErrorLog "logs/website1.loc.error.log"
  CustomLog "logs/website1.loc.access.log" common
 
  AccessFileName .htaccess
 
  <Directory "d:/webserver/www/website1/">
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from 192.168.x.x
    Allow from 127.0.0.1
  </Directory>
</VirtualHost>

<VirtualHost website1.loc:443>
  DocumentRoot "d:/webserver/www/website1"
  ServerName website1.loc
  ServerAlias www.website1.loc
  ErrorLog "logs/website1.loc.error.log"
  CustomLog "logs/website1.loc.access.log" common
  
      SSLEngine on  
    SSLCertificateFile conf/ssl.crt/server.crt  
    SSLCertificateKeyFile conf/ssl.key/server.key  
 
  AccessFileName .htaccess
 
  <Directory "d:/webserver/www/website1/">
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from 192.168.1.x
    Allow from 127.0.0.1
  </Directory>
        
</VirtualHost>

#--------------------------
# website2 with Joomla 2.5
#--------------------------
<VirtualHost *:80>
  DocumentRoot "d:/webserver/www/website2"
  ServerName website2.loc
  ServerAlias www.website2.loc
  ErrorLog "logs/website2.loc.error.log"
  CustomLog "logs/website2.loc.access.log" common
 
  AccessFileName .htaccess
 
  <Directory "d:/webserver/www/website2/">
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from 192.168.x.x
    Allow from 127.0.0.1
  </Directory>
</VirtualHost>

<VirtualHost website2.loc:443>
  DocumentRoot "d:/webserver/www/website2"
  ServerName website2.loc
  ServerAlias www.website2.loc
  ErrorLog "logs/website2.loc.error.log"
  CustomLog "logs/website2.loc.access.log" common
  
      SSLEngine on  
    SSLCertificateFile conf/ssl.crt/server.crt  
    SSLCertificateKeyFile conf/ssl.key/server.key  
 
  AccessFileName .htaccess
 
  <Directory "d:/webserver/www/website2/">
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from 192.168.1.x
    Allow from 127.0.0.1
  </Directory>
        
</VirtualHost>
[/code]

in my host file i have:
www.website1.loc   192.168.1.x
website1.loc   192.168.1.x
www.website2.loc   192.168.1.x
website2.loc   192.168.1.x

1. now when in my browser i type website2.loc i have an error 500
2. if instead of using <VirtualHost *:80> i use <VirtualHost website1.loc:80> and <VirtualHost website2.loc:80> respectively for website1 and website2.... only website1.loc works :(
so where is my mistake ?
thx.

--
Alain
-----------------------------------------------------------
Windows 7 x64 / Fedora 16 x64
PostgreSQL 8.3.5 / MySQL 5
Apache 2.2.16
PHP 5.3.1
C# 2005-2008

[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