Avatar of beer9
beer9
Flag for India asked on

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
Apache Web Server

Avatar of undefined
Last Comment
gheist

8/22/2022 - Mon
gheist

Usually when you install mod_ssl it goes on to listen on :443
beer9

ASKER
so If I install mod_ssl then web server will automatically listen on both the port number, 80 & 443?
ASKER CERTIFIED SOLUTION
gheist

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
beer9

ASKER
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?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
beer9

ASKER
gheist, appreciate if you can confirm my above mentioned theory. Am I right?
gheist

it is usually called ssl.conf or mod_ssl.conf
You need to have SSLEngine enabled in virtual hosts on that port.