The CiviMail component of CiviCRM does not record opens/clicks. It normally tracks opens by going to sites/all/modules/civicrm/extern/open.php, but when I try to browse directly to that location I get a 403 Forbidden. I'm guessing the CiviCRM API is also blocked, since it lives in this /extern/ folder.

Comments

narayanis’s picture

I resolved this by creating a file at nginx_vhost_include.conf in /data/disk/[octopus_user]/config/server_master/nginx/post.d. That file contains the following:

    ###
    ### allow CiviCRM php files (like open.php)
    ###
    location ~* ^/sites/.*/(?:modules)/(civicrm)/.*\.php$ {
        access_log     off;
        try_files $uri =404;
        fastcgi_pass   127.0.0.1:9000; ### php-fpm listening on port 9000
    }

Then in shell ran service nginx restart.

Now Civimail click and open tracking appears to work.

omega8cc’s picture

Issue tags: +BOA-todo

Perfect. We need to add this exception to the main config, since we support CiviCRM now officially (in HEAD, but still..)

omega8cc’s picture

Status: Active » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.