LinuxQuestions.org
Visit Jeremy's Blog.
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 10-25-2004, 06:07 PM   #1
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Rep: Reputation: 30
Virtual Name Hosting And SSL


Im having problems hosting 2 virtual names and using SSL, here is basically what I want.

www.domain1.com:80
mail.domain1.com:443
www.domain2.com:80

I have tried quite a few configurations, most of which are docs for apache and not apache2.
http://www.siliconvalleyccie.com/lin...m#_Toc86342646
http://httpd.apache.org/docs-2.0/vho...es.html#ipport
http://www.linuxquestions.org/questions/history/233341
none of which work.

so here are my configs, hopefully you can help.
/etc/httpd/conf.d/41_mod_ssl.default-vhost.conf
Code:
<VirtualHost mail.domain1.com>
#  General setup for the virtual host
ServerName mail.domain1.com:443
ServerAdmin admin@domain1.com
DocumentRoot "/var/www/html/squirrelmail"
ErrorLog logs/ssl_error_log
etc...
</VirtualHost>
/etc/httpd/conf/vhosts/Vhosts.conf
Code:
NameVirtualHost *

<VirtualHost *>
ServerName www.domain2.com
ServerAlias domain2.com
DocumentRoot /home/username/public_html/domain2.com
</VirtualHost>

<VirtualHost (*External IP*):80>
ServerName www.domain1.com
ServerAlias domain1.com
DocumentRoot /home/username/public_html/domain1.com
</VirtualHost>
The errors Im receiving depend on what was my last config mistake, but with particular setup Im getting:
Bad Request

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

Thank you,
TheGNUbie
 
Old 10-26-2004, 09:06 AM   #2
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Original Poster
Rep: Reputation: 30
any suggestions?
 
Old 10-27-2004, 09:52 AM   #3
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Original Poster
Rep: Reputation: 30
bueller?................Bueller.............
 
Old 10-27-2004, 10:19 AM   #4
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Original Poster
Rep: Reputation: 30
got it...

Im retarted.
 
Old 12-10-2004, 10:05 PM   #5
RHrulz
Member
 
Registered: Jul 2002
Location: Troy, KS
Distribution: Mandrake 10.1
Posts: 57

Rep: Reputation: 15
ryedunn,

What did you do? I am trying to the same thing.
 
Old 12-11-2004, 10:33 AM   #6
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Original Poster
Rep: Reputation: 30
There was another file that I needed to have the virtual names listed in. Its been a while so Im having problems thinking of which file it was...Im running out of the house right now so I cant go searching but if you cant find it by tomorrow I will find it for you.
 
Old 12-31-2004, 02:41 PM   #7
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459

Original Poster
Rep: Reputation: 30
if you still needed it

on my server httpd2.conf had a line that included everything in the /etc/httpd/conf.d directory. .. within that dir was a file 41_mod_ssl.default-vhost.conf... after adding a few lines...

NameVirtualHost *

<VirtualHost *>
ServerName www.Domain1.com
ServerAlias domain1.com
DocumentRoot /location/of/web/directory
</VirtualHost>

<VirtualHost *>
ServerName www.domain2.com
ServerAlias domain2.com
DocumentRoot /location/of/second/web/directory
</VirtualHost>

<VirtualHost mail.domain2:443>

# General setup for the virtual host
ServerName mail.domain2:443
ServerAdmin admin@domain2.com
DocumentRoot "/var/www/html/squirrelmail"
ErrorLog logs/ssl_error_log
<IfModule mod_log_config.c>
TransferLog logs/ssl_access_log
</IfModule>


hope that helps somone.
 
  


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
Virtual Hosting for ssl connections? anorman Linux - Networking 1 11-23-2005 06:28 PM
Virtual Hosting bstuart Linux - Software 1 06-19-2005 12:26 PM
Virtual Hosting Thom_Redhat Fedora 0 01-14-2005 08:26 AM
Virtual hosting... id10t Linux - Networking 4 02-02-2004 06:43 PM
Virtual Hosting - what does it actually do? gevers1 Linux - General 3 02-01-2004 10:28 AM

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

All times are GMT -5. The time now is 11:52 PM.

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