Page 1 of 1

Removing SSL Certificate

PostPosted: 24. September 2011 16:48
by pcs800
I am working for a company with a pre-existing installation of xampp/apache/etc, they are asking me to remove the SSL certificate from the site since it is not in use anymore. I have no idea how to do this. Is it just a file sitting somewhere?
I have also been asked to route HTTPS requests to HTTP, help with that would be awesome too.
Thanks in advance.

Re: Removing SSL Certificate

PostPosted: 24. September 2011 16:56
by Sharley
We require your XAMPP version and your Windows Version to provide the correct version support.
viewtopic.php?f=16&t=48331
viewtopic.php?f=16&t=32670

Thanks.

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:03
by pcs800
Windows 2003 server, xampp control panel version 2.5

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:04
by pcs800
From read me file,
###### ApacheFriends XAMPP (basic package) version 1.6.3a ######

+ Apache 2.2.4
+ MySQL 5.0.45
+ PHP 5.2.3 + PHP 4.4.7 + PEAR
+ PHP-Switch win32 1.0 (please use the "php-switch.bat")
+ XAMPP Control Version 2.5 from www.nat32.com
+ XAMPP Security 1.0
+ SQLite 2.8.15
+ OpenSSL 0.9.8e
+ phpMyAdmin 2.10.3
+ ADOdb 4.95
+ Mercury Mail Transport System v4.01b
+ FileZilla FTP Server 0.9.23
+ Webalizer 2.01-10
+ Zend Optimizer 3.3.0
+ eAccelerator 0.9.5.1 for PHP 5.2.3 (comment out in the php.ini)

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:22
by Sharley
Thanks for the details, it helps.

Open the \xampp\apache\conf\httpd.conf file and look for this:
Code: Select all
# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf
Add a comment like this
Code: Select all
# Secure (SSL/TLS) connections
# Include conf/extra/httpd-ssl.conf
Save the file and restart Apache and no more https.

Redirect https to http you may like to read these Google search results

You will need to construct a .htaccess file with the required rewriterule and place it in your web root folder.

If it is not constructed correctly you will receive a error 500 - look in the apache\logs\error.log file for clues.

Good luck.

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:30
by pcs800
Thanks a million for that info, I will look right now. In the mean time, here's an email I got from the boss, do I have to do something with php so I don't break it?
--
Make sure to leave the PHP socket layer on though...we still need that.
Just remove the SSL security cert off...so that we get https:// requests mapped to http:// addresses.

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:34
by Sharley
The httpd.conf file edit will not affect PHP and the .htaccess rewriterule won't either.

You should have no problems doing the above simple server edits.

Best wishes :)

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:39
by pcs800
After checking the server I find an .htaccess file already exists in the web folder. It's only line is this:
ErrorDocument 404 /notfound.php

So if I add the opposite of this (found in that google search for forcing http to https) it should work?
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

The opposite of that would be
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ http://www.example.com/$1 [R,L]

No??????

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:41
by pcs800
I meant----
The opposite of that would be
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ http://www.example.com/$1 [R,L]

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:49
by Sharley
Seriously, in the search results you should find exactly what you want, now that you know what you want.

When tackling these issues don't be worried about experimenting to see what will work and what won't work.

Your server will be down only for a very short time until you revert.

Best way to learn I find.

Good luck :D

Re: Removing SSL Certificate

PostPosted: 24. September 2011 17:53
by pcs800
Yeah I am experimenting, one of the best ways to learn is to talk to someone who knows more about it.

When I create this entry in the httpd.conf file
# Secure (SSL/TLS) connections
# Include conf/extra/httpd-ssl.conf

It does disable ssl, so I add this to the .htaccess file
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R,L]

restart apache and it doesn't work unless i then remove the comment from the httpd.conf file
IE: They don't work together.

I will continue googling in cased you don't have toime or patience to help any further.

Re: Removing SSL Certificate

PostPosted: 24. September 2011 18:01
by Sharley
When you disable the ssl running on port 443 using the httpd.conf file then why use port 443 in your .htaccess file?

You only want to redirect a https URI to a http URI not a port redirect.

What did the error.log file say about it as 'don't work' means nothing?

Re: Removing SSL Certificate

PostPosted: 24. September 2011 18:26
by Sharley
Topic closed OP has gone elsewhere for help.