Last active
January 2, 2016 14:56
-
-
Save 4lun/556a57194bad38158c24 to your computer and use it in GitHub Desktop.
Piwik nginx config (including way to rename piwik client files)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80 ipv6only=on; | |
root /var/piwik; | |
index index.php index.html index.htm; | |
server_name piwik.local; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
# Alternative url for piwik.js - obscure the presence of Piwik | |
# (You can also create _.php in the root directory that requires piwik.php) | |
location = /_.js { | |
try_files /piwik.js =404; | |
} | |
location ~ \.php$ { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment