Skip to content

Nginx Support (Contribution) #270

Description

@bet0x

Make sure that your issue is reproducible by doing the following tasks

  • I am using application packages whose source code is not optimized for production (source code is not minified).
  • I have activated the test mode by changing the TEST constant value to true in the .\index.php file.
  • I have made sure that there are files named error or error-x or error-y in the .\engine\log folder.

What installation method did you use?

Composer

Describe your issue in the field below

Hello all,

I didn't found the documentation on git to place a PR but here it is the code block for Nginx to get it working and secured too:

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

location ~ \.php$ {
     fastcgi_intercept_errors on;
     include        fastcgi_params;
     fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
     fastcgi_pass unix:/run/php-fpm/www.sock;
}

location ~ /\. { deny all; }

location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
    expires 30d;
    add_header Pragma public;
    add_header Cache-Control "public";
}

Package version

Development version (package on the main branch)

Package version number

3.0.0

What browsers are you seeing the problem on?

Firefox

Error logs of the core application if any

No response

Error log of the extension if any

No response

Error log of the layout if any

No response

General error logs if any (if the application fails to set a custom error log path, then the error log will usually appear in this location)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementsiteAbout the website (mecha-cms.com)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions