• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

Force apache 443 to port 80

I've installed a Raspian/Debian webserver. It works fine when I browse to http://98.102.63.nnn/, but when I browse to https://98.102.63.nnn/ I get "This page can’t be displayed". I've used IP tables to forward port 443 to 80 and I have $DOCUMENT_ROOT/.htaccess set to:
RewriteEngine On
RewriteBase /
RewriteRule ^/?(.*)     http://%{SERVER_NAME}/index.html [L,R=301]

Open in new window

which may not be correct at all.

Could someone help me figure this out?
  • 2
1 Solution
You have to configure apache to accept HTTPS (443) connections.  

It's a lot to type, but google is your friend.  Here is the first how to I came across, but there are plenty out there.  Google "configure apache for https".

Dave BaldwinFixer of ProblemsCommented:
When you try to connect with 'https', a secure connection is requested.  If you have not installed an SSL/TLS certificate, the connection will not be made which means that you can not redirect from port 443 to port 80.
@Dave Baldwin, he has to configure apache for https connections, no?
jmarkfoleyAuthor Commented:
Well I was hoping to avoid all that, but I guess I cannot. I'm used to apache on Slackware which configures a bit different. Your link gave me a good howto for Debian. I copied in and configured my ssl files and things are working.

Dave Baldwin - thanks for you response, but it didn't add substantially to savone's comment.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now