Tuesday, May 9, 2017

Mautic Nginx Configuration and Setup


Just a quick example of how to setup Mautic using Nginx.

server {
listen 443;
    server_name mautic.example.com;

ssl on;
    ssl_certificate /etc/letsencrypt/live/mautic.example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mautic.example.com/privkey.pem; # managed by Certbot

    access_log /var/log/nginx/mautic_access.log;
    error_log /var/log/nginx/mautic_error.log;

    client_max_body_size 50m;

    gzip on;
    gzip_proxied any;
    gzip_types       text/css text/plain text/xml application/xml application/javascript application/x-javascript text/javascript application/json text/x-json;
    gzip_vary        on;
    gzip_disable     "MSIE [1-6]\.";

    root /home/example/mautic;
    index index.php index.html index.htm;

    # redirect index.php to root
    #rewrite ^/index.php/(.*) /$1  permanent;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }
}

1 comment:

Unknown said...

Online casino games independently.
G club It is the site of the most innovative betting center in Asia. By choosing the challenge of the latest bets, you can enjoy the fun of mobile telephony without the hassle of having to travel long distances or go to a risky casino. OUR GCLUB 69 is delighted to bring the gambler to the forefront of gambling and high-end gambling. Great choice of casino games to win the lottery are so easily. Betting Games All bets are available in a variety of ways. The insurance is available for more than nine years and is very much appreciated to make the player bet on their own desires. This is a great way to have fun and make your online gambler experience a live betting experience. The signs are very realistic. Do not wait, come and visit us at the website. จีคลับ