How to run a apache server which would listen on both port 80 and 443

I would like to configure a apache server which would listen on both the port 80 and 443 and and later I can rewrite or redirect all the port 80 request to port 443 for HTTPS protocol communications
beer9Asked:
Who is Participating?
 
gheistCommented:
If you use system's package manager (like apt or yum) it happens instantly (well - after server reload)
If not - scan apache .conf files for number 443
0
 
gheistCommented:
Usually when you install mod_ssl it goes on to listen on :443
0
 
beer9Author Commented:
so If I install mod_ssl then web server will automatically listen on both the port number, 80 & 443?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
beer9Author Commented:
sorry, I still did not get it. I am assuming I can put "Listen 80" in main configuration and in the <VirtualHost> block I can define 443? so this way my apache instance will listen on both port 80 and 443?
0
 
beer9Author Commented:
gheist, appreciate if you can confirm my above mentioned theory. Am I right?
0
 
gheistCommented:
it is usually called ssl.conf or mod_ssl.conf
You need to have SSLEngine enabled in virtual hosts on that port.
0
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.

All Courses

From novice to tech pro — start learning today.