Piwik configuration (Nginx and Apache with mod_php) on Centos 6.7

(Michael Alexander) #1

I have a problem with setting up Piwik with Nginx and Apache mod_php. I’ve tried with the non-piwik Nginx and end up like this

After that I have followed the piwik-nginx configuration, but I think I’m not configured it properly, I have several servers and divide them to this:

  1. with Nginx as Load Balancer
  2., as Web-Server with Apache mod_php
  3. 192,168.10.175 as Database Server

Suppose I have abc.blabla.com as a domain assigned to Piwik.

  1. I’ve changed all stats.example.com with abc.blabla.com, changed root path according to the website directory on web server in sites-available/stats.example.com.conf.
  2. Added web server in upstream_phpapache.conf like this
    upstream phpapache {
    server weight=1;
    server weight=1;
  3. Commented out the include upstream_phpcgi.conf; line in nginx.conf. and uncomment the lines:
    include reverse_proxy.conf;
    include upstream_phpapache.conf;
  4. Create the /var/cache/nginx/proxycache directory owned by the unpriveleged ‘nginx’ user commented out include fastcgi_cache_zone.conf; and uncommented the line include proxy_cache_zone.conf; on nginx.conf
  5. Create the /etc/nginx/sites-enabled directory but how do I enable a virtual host? There are no methods described in piwik-nginx configuration.

And finally ends up the webpage isn’t available (ERR_CONNECTION_REFUSED) :frowning:

Is there anything that I missed?