Skip to content

Instantly share code, notes, and snippets.

View rickhernandezio's full-sized avatar
🎯
Focusing

Rick Hernandez rickhernandezio

🎯
Focusing
View GitHub Profile
@rickhernandezio
rickhernandezio / install.sh
Created January 13, 2018 22:40
How to install PHP
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
@rickhernandezio
rickhernandezio / gist:5394460690c79dbfa7562caf898093de
Last active January 14, 2018 01:37
How to install composer
sudo apt-get install composer
composer install
sudo apt-get install php-zip php-xml php-imap php-opcache php-apcu php-memcached php-mbstring php-curl php-amqplib php7.0-mbstring php7.0-bcmath php7.0-intl
cd /etc/apache2/sites-available
vim mautic.conf
@rickhernandezio
rickhernandezio / social
Last active November 8, 2021 07:49
Apache Config for Mautic
<VirtualHost *:80>
ServerAdmin info@mydomain.com
ServerName mydomain.com
ServerAlias mautic.mydomain.com
Redirect permanent / https://mautic.mydomain.com
</VirtualHost>
<VirtualHost *:443>
ServerName social.mydomain.com
DocumentRoot /var/www/mautic
cd /etc/apache2/ssl
mkdir mautic
cd mautic
openssl req -newkey rsa:2048 -nodes -keyout www.key -x509 -days 365 -out www.crt
@rickhernandezio
rickhernandezio / Output of SSL
Created January 13, 2018 23:16
Output of SSL
writing new private key to 'www.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
cd /var/www
mkdir logs
a2ensite mautic.conf
systemctl restart apache2
@rickhernandezio
rickhernandezio / permissions.sh
Last active May 15, 2024 00:46
Permissions for Mautic
cd /var/www/mautic
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R g+w app/cache/
chmod -R g+w app/logs/
chmod -R g+w app/config/
chmod -R g+w media/files/
chmod -R g+w media/images/
chmod -R g+w translations/
chown -R $USER:www-data .