Apache conf files

Just curious…

In an https install, where I set the interface preference to 0, ports to 443, protocol to https - should I have just the zzzkaltura.ssl.conf alias in /etc/httpd/conf.d or should I also have the zzzkaltura.conf alias? It looks like the latter might do the fwd/redirect from http to https if someone attempts to access a resource via http. Currently, attempting to access http just results in a 400 error.

Hello,

The install puts either HTTPs config, in the form of zzzkaltura.ssl.conf which points to /opt/kaltura/app/configurations/apache/kaltura.ssl.conf or none SSL config:
# ll /etc/httpd/conf.d/zzzkaltura.conf
lrwxrwxrwx. 1 root root 51 Mar 15 15:34 /etc/httpd/conf.d/zzzkaltura.conf -> /opt/kaltura/app/configurations/apache/kaltura.conf

If you want to redirect HTTP to HTTPs, I suggest you add that in a separate file under /etc/httpd/conf.d

reason why I say a separate one, is so that it is not overridden by upgrades.
So something like:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

in a file that is parsed first, should suffice.

1 Like