CiviCRM on a LEMP stack

3.52K viewsNginxConfiguration Intermediate

Can CiviCRM be installed on a LEMP stack? I know it uses .htaccess files in a few places and Nginx doesn’t use those.


Yes, CiviCRM works fine with WordPress on Nginx. However, since Nginx doesn’t use .htaccess you’ll want to add any changes to your site-specific configuration.

For example, there are a few upload directories that have .htaccess files denying access to their contents. To do the same thing in Nginx, you’d want to add a location block to your site’s configuration.

location ~* ^/wp-content/plugins/files/civicrm/(?:ConfigAndLog|custom|upload|templates_c) {
  access_log off;
  return 404;