oikonomiyaki
oikonomiyaki

Reputation: 7951

Enable HTTPS on php application served by httpd

We have an existing PHP web application served by httpd and my current responsibility is enabling HTTPS on that application. (I am not a PHP guy). I already have the signed certificates ready (.pem). Most tutorials I've read in enabling HTTPS assumes that I have some cPanel where I can install the certificates. In our case, the app is actually served by httpd installed in an AWS EC2 instance (RedHat Linux, I suppose). So my question is:

(1) In which part do I enable the HTTPS, in the httpd configuration or in the application's PHP code? Or both? What should I change?

(2) I understand that the standard port for HTTPS is 443. That port is non-existent based on our network ingress rules. Can we change the standard HTTPS port other than 443 and how?

Upvotes: 0

Views: 306

Answers (1)

MofX
MofX

Reputation: 1567

I don't know anything about aws, but I can answer your two concrete questions:

  1. Php does not serve websites through http or https. You have to enable https in the webserver. The webserver then calls php to execute the code and returns the result via http or https.

  2. HTTPS port should always be 443, otherwise the user has to enter the port when connecting to your website

Upvotes: 1

Related Questions