Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Either HTTPS or HTTP but not both

Status
Not open for further replies.

jimbojames5645

Programmer
Dec 12, 2003
36
US
I just setup a SuSE Linux ES 9 server and am trying to get apache2 to support both http:// and if i start apache with /etc/init.d/apache2 start i get access via if i start apache with apache2ctl startssl i get access via https:// but i can't get both. any ideas?
 

Startssl simply passes the SSL flag which make
<Ifdefine SSL> return true. If you look at your httpd.conf, there should be lots of directives surrounded by the <Ifdefine SSL> that are turned on/off depending on how apachectl argment was start or startssl.

The typical way to have both is to use virtual hosting (it has to be an IP based virtual host, not named based) and define one virtual host listening on port 80, and the other on port 443.

I usually change the overall Listen directive first,
so
Listen a.b.c.d:80
Listen a.b.c.d:443

Then as virtual host:

<VirtualHost a.b.c.d:80>
directives for the http version
</VirtualHost>

<VirtualHost a.b.c.d:443>
directives for the https version including
SslEngine on
and other SSL cert stuff, like your Certificate file.
</VirtualHost>

You will need to startssl in order to load the ssl modules, but it now should support both http and https.

gene

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top