Clone this repo to a temp folder.
git clone https://github.com/avido/liferay-ubuntu-nginx-certbot.git .
apt get update
sudo apt-get install libncurses5
sudo apt-get install nginx
Copy example nginx site to /etc/nginx/site-available
\
the .ssl version is a guideline for after installing certbot, we adjust the automated config adjust by certbot a bit (snippets/)
Edit example file to your needs
Symlink config file in enabled sites.
sudo ln -s /etc/nginx/sites-available/<site> /etc/nginx/sites-enabled/<site>
Test nginx config
sudo nginx -t
Reload nginx config
sudo nginx -s reload
\
wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto
sudo /usr/local/bin/certbot-auto --nginx
-- install certificate
sudo certbot --nginx -d example.com -d www.example.com
https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/
Auto renewal should be present in /etc/cron.d/ if not you can copy the snippet
sudo cp -r snippets /etc/nginx/
edit your site config
wget https://bitnami.com/redirect/to/712122/bitnami-liferay-7.2.0-4-linux-x64-installer.run
Give exec rights to bitname installer
chmod +x bitnami-liferay-7.2.0-4-linux-x64-installer.run
sudo ./bitnami-liferay-7.2.0-4-linux-x64-installer.run
- append tomcat-server-snippet.xml contents to
/opt/liferay-7.2.0-4/apache-tomcat/conf/server.xml
sudo cp tomcat /etc/init.d/
sudo chmod +x /etc/init.d/tomcat
sudo systemctl enable tomcat