Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save amanjuman/ebbae281a0db43fff3d069d15cfeb79a to your computer and use it in GitHub Desktop.
Save amanjuman/ebbae281a0db43fff3d069d15cfeb79a to your computer and use it in GitHub Desktop.
Mautic LEMP Config with PHP7.0FPM in Ububtu 14.04 x64
server
{
listen 80;
listen [::]:80;
server_name subdomain.example.com;
if ($host = subdomain.example.com)
{
return 301 https://$host$request_uri;
}
}
server {
listen 443;
listen [::]:443;
ssl_certificate /etc/letsencrypt/live/subdomain.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/subdomain.example.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
server_name subdomain.example.com;
root /var/www/mautic;
index index.php index.html;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~* ^/index.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment