Skip to Content
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Sign in
  • Nederlands English (US) Español (AR)
  • Contact Us
  • Home
  • Blog
  • Jobs
  • Contact us
Cafayate.Net
  • 0
  • 0
    • Home
    • Blog
    • Jobs
    • Contact us
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Sign in
  • Contact Us

Mautic nginx config

  • All Blogs
  • Tech Blog
  • Mautic nginx config
  • March 5, 2021 by
    Administrator
    # 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
    }
    # Deny everything else in /app folder except Assets folder in bundles
    location ~ /app/bundles/.*/Assets/ {
    allow all;
    access_log off;
    }
    location ~ /app/ { deny all; }
    # Deny everything else in /addons or /plugins folder except Assets folder in bundles
    location ~ /(addons|plugins)/.*/Assets/ {
    allow all;
    access_log off;
    }
    location ~ /(addons|plugins)/ { deny all; }
    # Deny all php files in themes folder
    location ~* ^/themes/(.*)\.php {
    deny all;
    }
    # Don’t log favicon
    location = /favicon.ico {
    log_not_found off;
    access_log off;
    }
    # Don’t log robots
    location = /robots.txt {
    access_log off;
    log_not_found off;
    }
    # Deny yml, twig, markdown, init file access
    location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
    deny all;
    access_log off;
    log_not_found off;
    }
    # Deny all attempts to access hidden files/folders such as .htaccess, .htpasswd, .DS_Store (Mac), etc…
    location ~ /\. {
    deny all;
    access_log off;
    log_not_found off;
    }
    # Deny all grunt, composer files
    location ~* (Gruntfile|package|composer)\.(js|json)$ {
    deny all;
    access_log off;
    log_not_found off;
    }

     

     

    https://gist.github.com/that0n3guy/905c812c0f65e7ffb5ec

     

    In subdirectory pages

    Thanks for your help.

    I looked at your POST and I have seein that you have added the following lines into your nginx virtual host setup file:

    ————-
    4) Edit your site’s server block.

    The normal path is: /etc/nginx/sites-available/yoursite.com

    location /pages {
    try_files $uri $uri/ /pages/?q=$uri&$args;
    }
    ————-

    Did you only added this?
    ——
    location /pages {
    try_files $uri $uri/ /pages/?q=$uri&$args;
    }
    ——

    Is it enough to cover ALL Mautic needs to run on NGINX?
    Or have you added any other lines? If so, could you please share?

    in Tech Blog
    Website not selectable at more than one databases #1401 Odoo

    Designed for companies

    We are a team of passionate people whose goal is to improve everyone's life through disruptive products. We build great products to solve your business problems. Our products are designed for small to medium size companies willing to optimize their performance.

    Get in touch

    Plantexel
    Pedernera
    Salta Capital 
    Argenina

    • +31 653-919-302
    • [email protected]
    Follow us
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)