Showing posts from January, 2020

Put your Tomcat behind a reverse proxy on CentOS

I have an API service with an embedded tomcat running on port 8080 on a CentOS server. I don't want to expose it directory and I want to access this API threw HTTPS (port 443). If I access to it on 'classic' http (port 80) A simple solution is to deploy an Apache httpd server on my CentOS and use is as reverse proxy. Step 1 : install Apache httpd server yum install httpd yum install mod_ssl Open /etc/https/conf/httpd.conf file and add the directive Listen 443 after Listen 80 to enable apache to listen to port 443 Step 2 : Install your certificate files First all all, you can to install your certificate by copying  your three files to a directory of your choice. For me, it's /etc/ssl like this : 000000000 4 -rw-r--r--.   1 root root 1674  9 janv. 18:20 intermediate-CA.key 000000000 4 -rw-r--r--.   1 root root 1708  9 janv. 18:20 private.key 000000000 4 -rw-r--r--.   1 root root 2248  9 janv. 18:20 public.key Everything is x509 key encoded in ba