Removing SSL Certificate

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Removing SSL Certificate

Postby pcs800 » 24. September 2011 16:48

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.
pcs800
 
Posts: 33
Joined: 22. September 2005 15:08

Re: Removing SSL Certificate

Postby Sharley » 24. September 2011 16:56

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.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Removing SSL Certificate

Postby pcs800 » 24. September 2011 17:03

Windows 2003 server, xampp control panel version 2.5
pcs800
 
Posts: 33
Joined: 22. September 2005 15:08

Re: Removing SSL Certificate

Postby pcs800 » 24. September 2011 17:04

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)
pcs800
 
Posts: 33
Joined: 22. September 2005 15:08

Re: Removing SSL Certificate

Postby Sharley » 24. September 2011 17:22

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.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Removing SSL Certificate

Postby pcs800 » 24. September 2011 17:30

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.
pcs800
 
Posts: 33
Joined: 22. September 2005 15:08

Re: Removing SSL Certificate

Postby Sharley » 24. September 2011 17:34

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 :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Removing SSL Certificate

Postby pcs800 » 24. September 2011 17:39

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??????
pcs800
 
Posts: 33
Joined: 22. September 2005 15:08

Re: Removing SSL Certificate

Postby pcs800 » 24. September 2011 17:41

I meant----
The opposite of that would be
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ http://www.example.com/$1 [R,L]
pcs800
 
Posts: 33
Joined: 22. September 2005 15:08

Re: Removing SSL Certificate

Postby Sharley » 24. September 2011 17:49

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
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Removing SSL Certificate

Postby pcs800 » 24. September 2011 17:53

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.
pcs800
 
Posts: 33
Joined: 22. September 2005 15:08

Re: Removing SSL Certificate

Postby Sharley » 24. September 2011 18:01

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?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Removing SSL Certificate

Postby Sharley » 24. September 2011 18:26

Topic closed OP has gone elsewhere for help.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 124 guests