Piwik conf file

Paul N. Pace paulnpace at gmail.com
Mon Aug 19 21:53:36 UTC 2013


I have recently discovered this wonderful includes directive and I am
using it to clean up my server blocks. Doing this has forced me to
evaluate some of my configurations.

I am trying to set up a conf file for Piwik installations and I'm
hoping a second set of of eyes can help:

location /piwik/ {

     location /js/ {
         allow all;
     }

     location ~ /js/.*\.php$ {
         include /etc/nginx/global-configs/php.conf;
     }

    location ~ /piwik.php$ {
         include /etc/nginx/global-configs/php.conf;
     }

    return 301 https://server_name$request_uri?;
}

Piwik seems trickier than other applications because certain
components must be available through HTTP sessions or else browsers
give scary warnings or don't load the tracking code, but I want to
force the Piwik dashboard to open in HTTPS.

Any comments appreciated.

Thanks!


Paul



More information about the nginx mailing list