Last active
June 24, 2021 14:12
-
-
Save douglascrp/93cebe64a3d499a373b9e9d862ae8e6e to your computer and use it in GitHub Desktop.
Alfresco with Apache proxy and Let's Encrypt on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install apache2 | |
sudo a2enmod proxy | |
sudo a2enmod proxy_ajp | |
sudo mkdir -p /var/www/<alfresco-domain> | |
sudo chown -R $USER:$USER /var/www/<alfresco-domain> | |
sudo chmod -R 755 /var/www | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/<alfresco-domain>.conf | |
sudo vim /etc/apache2/sites-available/<alfresco-domain>.conf | |
<VirtualHost *:80> | |
ServerAdmin <admin@domain> | |
ServerName <alfresco-domain> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
ProxyPass /alfresco ajp://localhost:8009/alfresco | |
ProxyPassReverse /alfresco ajp://localhost:8009/alfresco | |
ProxyPass /share ajp://localhost:8009/share | |
ProxyPassReverse /share ajp://localhost:8009/share | |
</VirtualHost> | |
sudo a2ensite <alfresco-domain>.conf | |
sudo a2dissite 000-default.conf | |
sudo service apache2 restart | |
sudo vim /opt/alfresco/tomcat/conf/server.xml | |
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" /> | |
Edit port config sections 8080, 8443 and 8009 and include the parameter | |
address="127.0.0.1" | |
sudo service alfresco restart | |
** O processo abaixo já não serve mais para o Ubuntu 16.04, e nesse caso, usar o procedimento de upgrade do gist "Upgrade certbot para AcmeV2 Ubuntu 16.04" | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
sudo apt-get install python-certbot-apache | |
sudo certbot --apache -d <alfresco-domain> | |
sudo certbot renew --dry-run | |
sudo crontab -e | |
30 2 * * 1 certbot renew >> /var/log/le-renew.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If using another certificate with a paraphrase, then edit the file | |
/etc/apache2/mods-enabled/vim ssl.conf | |
Change the line | |
SSLPassPhraseDialog exec:/opt/alfresco/ssl/passphrase-file | |
Where the file /opt/alfresco/ssl/passphrase-file | |
Has execution permission, containing the following: | |
#!/bin/sh | |
echo "thepassword" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Processo para instalação: | |
https://certbot.eff.org/lets-encrypt/pip-apache | |
Nos comandos, substituir python3 por python3.6 | |
Mas antes para que funcione, é importante que o python seja atualizado para a versão 3.6 | |
https://www.tecmint.com/install-python-in-ubuntu/ | |
E antes disso ainda, instalar python3.6-venv | |
sudo apt install python3.6-venv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment