Skip to content

Instantly share code, notes, and snippets.

@al-ramadhan
Created April 10, 2017 04:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save al-ramadhan/f7b0df9107ce5180f2bfa8996778d711 to your computer and use it in GitHub Desktop.
Save al-ramadhan/f7b0df9107ce5180f2bfa8996778d711 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name stats.facebook.id;
access_log /var/log/nginx/piwik_access.log;
error_log /var/log/nginx/piwik_error.log;
root /opt/www/piwik;
# Static
location / {
index index.php;
}
location /config.ini.php {
root /opt/www/piwik/config;
index config.ini.php;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_hide_header X-Powered-By;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment