Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I update my VirtualHosts to allow an SSL VirtualHost?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Gtwy
n00b
n00b


Joined: 24 Feb 2007
Posts: 3
Location: Pittsburgh, PA

PostPosted: Sat Feb 24, 2007 1:18 am    Post subject: How do I update my VirtualHosts to allow an SSL VirtualHost? Reply with quote

Basically these are my virtual hosts:

Code:
NameVirtualHost *

<VirtualHost *>
  ServerName gtwy.net
  ServerAdmin jameswatt@gmail.com
  ScriptAlias /cgi-bin/ /domain/gtwy/cgi-bin/
  DocumentRoot /domain/gtwy/html
  ErrorLog logs/gtwy.err
  TransferLog logs/gtwy.log
  CustomLog logs/gtwy.net-access_log combined
</VirtualHost>

<VirtualHost *>
  ServerName www.gtwy.net
  ServerAdmin jameswatt@gmail.com
  ScriptAlias /cgi-bin/ /domain/gtwy/cgi-bin/
  DocumentRoot /domain/gtwy/html
  ErrorLog logs/gtwy.err
  TransferLog logs/gtwy.log
  CustomLog logs/gtwy.net-access_log combined
</VirtualHost>

<VirtualHost *>
  ServerName wiki.gtwy.net
  ServerAdmin jameswatt@gmail.com
  ScriptAlias /cgi-bin/ /domain/gtwy/wiki/cgi-bin/
  DocumentRoot /domain/gtwy/wiki/html
  ErrorLog logs/gtwy.err
  TransferLog logs/gtwy.log
  CustomLog logs/gtwy.net-access_log combined
</VirtualHost>

<VirtualHost *>
  ServerName comics.gtwy.net
  ServerAdmin jameswatt@gmail.com
  ScriptAlias /cgi-bin/ /domain/gtwy/comics/cgi-bin/
  DocumentRoot /domain/gtwy/comics/html
  ErrorLog logs/gtwy.err
  TransferLog logs/gtwy.log
  CustomLog logs/gtwy.net-access_log combined
</VirtualHost>

<VirtualHost *>
  ServerName imperialistic.us
  ServerAdmin imperialisticus@gmail.com
  ScriptAlias /cgi-bin/ /domain/ius/cgi-bin/
  DocumentRoot /domain/ius/html/
  ErrorLog logs/ius
  TransferLog logs/ius
  CustomLog logs/ius combined
</VirtualHost>

<VirtualHost *>
  ServerName globaldominance.imperialistic.us
  ServerAdmin imperialisticus@gmail.com
  ScriptAlias /cgi-bin/ /domain/ius/cgi-bin/
  DocumentRoot /domain/ius/html/
  ErrorLog logs/ius
  TransferLog logs/ius
  CustomLog logs/ius combined
</VirtualHost>

<VirtualHost *>
  ServerName www.imperialistic.us
  ServerAdmin imperialisticus@gmail.com
  ScriptAlias /cgi-bin/ /domain/ius/cgi-bin/
  DocumentRoot /domain/ius/html/
  ErrorLog logs/ius
  TransferLog logs/ius
  CustomLog logs/ius combined
</VirtualHost>


Mod_ssl is installed (apache2 configured w/ ssl). I can start apache as -D SSL without a problem, however it doesn't do anything for me until I have an SSL enabled virtual host. I have been able to look at netstat to make sure that Apache is binding to the SSL port also, so that is not an issue. The issue is the virtual hosts...

I've tried various ways of reconfiguring my virtual hosts, but nothing works. I have read all of the SSL stuff on the Gentoo Wiki and spend the past 2 days googling for other information.

If someone could help me out by showing me the proper syntax this would become when I added a single SSL virtual host to it, I would greatly appreciate it.

Note: I do have about 8 IP addresses if I need to configure SSL on separate IP address (tried that too)...


Thanks in advance. :)
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Sat Feb 24, 2007 2:44 pm    Post subject: Reply with quote

you didn't look very hard, did you? ;-)
http://httpd.apache.org/docs/2.0/vhosts/examples.html

oh, for your SSL, just use port 443 instead of 8080 or whatever is used in the example.

and
Quote:
Name-based virtual hosting cannot be used with SSL secure servers because of the nature of the SSL protocol.

so you MUST use different IP's for each SSL-vhost
Back to top
View user's profile Send private message
Gtwy
n00b
n00b


Joined: 24 Feb 2007
Posts: 3
Location: Pittsburgh, PA

PostPosted: Sun Feb 25, 2007 6:18 am    Post subject: Reply with quote

Actually I did look at that, and I did try a bunch of different ideas based on their syntax, but when I reload apache it always breaks it.

Also, while they list examples of running one on port 8080 and one on 80, they do not explicitly give an example of it running SSL.
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Sun Feb 25, 2007 9:01 am    Post subject: Reply with quote

Gtwy wrote:
Actually I did look at that, and I did try a bunch of different ideas based on their syntax, but when I reload apache it always breaks it.

"breaks it" = ??? what errors do you get? what works, what doesn't?
Gtwy wrote:
Also, while they list examples of running one on port 8080 and one on 80, they do not explicitly give an example of it running SSL.

I know, hence the line:
nielchiano wrote:
oh, for your SSL, just use port 443 instead of 8080 or whatever is used in the example.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum