Get the most out of your Centmin Mod LEMP stack
Become a Member

Mautic – Opensource Marketing Email Automation Nginx LEMP Setup Centmin Mod

Discussion in 'Other Web Apps usage' started by ljseals, May 9, 2017.

  1. ljseals

    ljseals Member

    101
    24
    18
    Dec 20, 2016
    Ratings:
    +46
    Local Time:
    12:06 PM
    Mautic is starting a marketing automation revolution liberating marketers from the conformity of yesterday’s tools. Powerful automation features combined with cutting-edge marketing intelligence, Mautic is surpassing old school vendors to address the needs of today’s marketers who work in a multi-channel, omni-channel world. It’s time to be free to be more creative and build smarter campaigns, faster.

    Mautic: Modern Marketing Automation and Marketing Intelligence

    Simple guide to setup Mautic.

    Install Nodejs (Nodejs is needed to install NPM)
    Code (Text):
    Code (Text):
    cd /usr/local/src/centminmod/addons
    ./nodejs.sh install

    Install Grunt
    Code (Text):
    Code (Text):
    npm install -g grunt-cli
    

    Create your V-Host using the Centmin Menu Option 2 (
    Add Nginx vhost domain) or by using the Let's Encrypt Acme tool.

    Code (Text):
    Code (Text):
    cd /usr/local/src/centminmod/addons/
    ./acmetool.sh

    Also create a Mysql Database and User.
    Code (Text):
    Code (Text):
    cd /usr/local/src/centminmod/addons/
    ./mysqladmin_shell.sh setuserdb


    I have chosen to use the subdomain market.domain.com but you may choose what you like as the subdomain.

    Modify Vhost
    Code (Text):
    nano /usr/local/nginx/conf/conf.d/market.domain.com.ssl.conf
    Code (Text):
    #x# HTTPS-DEFAULT
    server {
     
      server_name market.domain.com www.market.domain.com;
      return 302 https://$server_name$request_uri;
    }
    
    server {
      listen 443 ssl http2;
      server_name market.domain.com www.market.domain.com;
    
      include /usr/local/nginx/conf/ssl/market.domain.com/market.domain.com.crt.key.conf;
      include /usr/local/nginx/conf/ssl_include.conf;
    
      http2_max_field_size 16k;
      http2_max_header_size 32k;
      # mozilla recommended
      ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+ECDSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+SHA384:EECDH+AES128:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
      ssl_prefer_server_ciphers   on;
      #add_header Alternate-Protocol  443:npn-spdy/3;
    
      # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts
      #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
      #add_header X-Frame-Options SAMEORIGIN;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always;
      #spdy_headers_comp 5;
      ssl_buffer_size 1369;
      ssl_session_tickets on;
     
      # enable ocsp stapling
      resolver 8.8.8.8 8.8.4.4 valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/market.domain.com/log/access.log main_ext buffer=256k flush=60m;
      error_log /home/nginx/domains/market.domain.com/log/error.log;
    
      include /usr/local/nginx/conf/autoprotect/market.domain.com/autoprotect-market.domain.com.conf;
      root /home/nginx/domains/market.domain.com/public;
    
         # redirect index.php to root
        rewrite ^/index.php/(.*) /$1  permanent;
    
    
        # redirect some entire folders
        rewrite ^/(vendor|translations|build)/.* /index.php break;
    
    
        location / {
                    # First attempt to serve request as file, then
                    # as directory, then fall back to index.html
            # one option: try_files $uri $uri/ /index.php$is_args$args;
            try_files $uri /index.php$is_args$args;
                    # Uncomment to enable naxsi on this location
                    # include /etc/nginx/naxsi.rules
            }
    
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    


    Change directory to Mautic home directory
    Code (Text):
    cd /home/nginx/domains/market.domain.com/public
    wget https://github.com/mautic/mautic/releases/download/2.8.0/2.8.0.zip
    unzip 2.8.0.zip
    chown -R nginx:nginx /home/nginx/domains/market.domain.com/public
    


    *** Latest release at this date 5/9/17 is 2.8.0. Check Releases · mautic/mautic · GitHub for the latest releases.

    You will then have to go and setup the additional things that are required by going to Getting Started and setting up crontabs. God bless you!

     
    Last edited: May 10, 2017
  2. eva2000

    eva2000 Administrator Staff Member

    54,884
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:06 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Wow very nice @ljseals thanks for sharing the Mautic guide :)

    Just remember to use addons/acmetool.sh you need to first enable LETSENCRYPT_DETECT='y' as outlined in 1st post at https://centminmod.com/acmetool
     
  3. sfs00784

    sfs00784 Member

    35
    4
    8
    Nov 8, 2017
    Ratings:
    +13
    Local Time:
    1:06 AM
    Oh, no wonder i can set this up yesterday...