LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2008, 07:28 AM   #1
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Rep: Reputation: 30
ssl vhost


Hi
i am trying to setup a vhost file for a second ssl site but it keeps redirecting to the first ssl site
also i am usein ip based for the ssl is there anything that could be redirecting it and i have no redirect
 
Old 11-27-2008, 05:31 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 165Reputation: 165
IP based virtual hosting is the correct way for multiple ssl virtual hosts (unless you use different ports). Can you post some info about your .conf file and have you looked at the Apache docs?
 
Old 11-28-2008, 05:47 AM   #3
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
what i did was seterate the ssl vhosts
the 1st one is
Quote:
<VirtualHost 192.168.2.204:443>
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

ServerName secure.lag.ti.frontend
DocumentRoot "/home/lag/frontend/web"
DirectoryIndex index.php
AccessFileName .htaccess
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCertificateFile /etc/httpd/ssl/server1.crt
SSLCertificateKeyFile /etc/httpd/ssl/server1.key.unsecure
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>

#
#
# # ErrorLog "/etc/httpd/logs/lag-ssl-frontend.log"
# # CustomLog "/etc/httpd/logs/lag-ssl-access.log" combined
Alias /sf "/usr/share/pear/data/symfony/web/sf"
<Directory "/usr/share/pear/data/symfony/web/sf">
AllowOverride All
Allow from All
</Directory>
<Directory "/home/lag/frontend/web">
DirectoryIndex index.php
AllowOverride All
Allow from All
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary
</Directory>
#
#
</VirtualHost>
the 2nd one is
Quote:
<VirtualHost 192.168.2.203:443>
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

ServerName secure.staging.ti.frontend
DocumentRoot "/home/trunk/frontend/web"
DirectoryIndex index.php
AccessFileName .htaccess
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCertificateFile /etc/httpd/ssl/server.crt
SSLCertificateKeyFile /etc/httpd/ssl/server.key.unsecure
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>

#
#
# # ErrorLog "/etc/httpd/logs/trunk-ssl-frontend.log"
# # CustomLog "/etc/httpd/logs/trunk-ssl-access.log" combined
Alias /sf "/usr/share/pear/data/symfony/web/sf"
<Directory "/usr/share/pear/data/symfony/web/sf">
AllowOverride All
Allow from All
</Directory>
<Directory "/home/trunk/frontend/web">
DirectoryIndex index.php
AllowOverride All
Allow from All
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary
</Directory>

</VirtualHost>
and this is the ssl.conf
LoadModule ssl_module modules/mod_ssl.so
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLMutex default
NameVirtualHost 192.168.2.203:443
NameVirtualHost 192.168.2.204:443
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin

Also when i try open the secure.lag.ti.frontend i get secure.staging.ti.frontend if the vhost of secure.staging.ti.frontend is up but when i comment secure.staging.ti.frontend out secure.lag.ti.frontend works fine
the two cant work together for some reason

Last edited by mahmoud; 11-28-2008 at 05:53 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with apach virtual hosts ssl/non ssl sites danthach Linux - Networking 3 05-25-2006 07:40 AM
Apache ssl on only *one* vhost belorion Linux - Networking 1 12-01-2005 04:59 PM
Apache: Alias is working on ssl vhost but not on mass vhost jonavogt Linux - Software 0 06-07-2005 03:05 PM
vhost on fc2 install. defaults to 1 vhost only knightdog Linux - Newbie 8 11-12-2004 02:45 PM
vhost jk77 Linux - General 0 02-26-2002 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration