LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 06: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, 04:31 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
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, 04: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 04:53 AM.
 
  


Reply



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 06:40 AM
Apache ssl on only *one* vhost belorion Linux - Networking 1 12-01-2005 03:59 PM
Apache: Alias is working on ssl vhost but not on mass vhost jonavogt Linux - Software 0 06-07-2005 02:05 PM
vhost on fc2 install. defaults to 1 vhost only knightdog Linux - Newbie 8 11-12-2004 01:45 PM
vhost jk77 Linux - General 0 02-26-2002 04:33 PM

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

All times are GMT -5. The time now is 10:39 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
Open Source Consulting | Domain Registration