Adding Piwik to Apps folder - merging Perusio configs correctly

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
luxpir's picture

I'm trying to make use of Perusio's Piwik config alongside his Drupal config. I've copied the Piwik config files to /etc/nginx/apps/piwik/ and created a .conf file using the subdomain suggested (stats.example.com). This has the include to /apps/piwik.conf in it, as per the example conf file provided.

Do I need to add a DNS record/'officially' create a subdomain to run Piwik from that URL? If possible, I'd rather use an example.com/piwik structure, but that's proving tricky.

If I wanted to run it from a directory under www, what server_name would I use, so as not to create a conflict with existing .conf files?

Comments

It's not that hard.

perusio's picture

For starter include the piwik config at https://github.com/perusio/piwik-nginx/blob/master/apps/piwik/piwik.conf in the the drupal site.

Then prefix all the locations, except the regex based ones, with the directory. For example if your directory is named piwik prefix like here: https://gist.github.com/perusio/8975110.

Piwik is much simpler than Drupal.

Thanks.

luxpir's picture

I was overcomplicating it, creating another .conf for piwik in sites-available. Scrapped that on your advice, added the include in the Drupal site and added the prefixes. Thank you for your help/configs and dedication to performance :)

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: