Skip to content

Instantly share code, notes, and snippets.

@kradalby
Created February 22, 2015 21:07
Show Gist options
  • Select an option

  • Save kradalby/1ea8e17d2c0c32dcaa33 to your computer and use it in GitHub Desktop.

Select an option

Save kradalby/1ea8e17d2c0c32dcaa33 to your computer and use it in GitHub Desktop.
observium_onyx
server {
listen 80;
listen [::]:80;
server_name observium.kradalby.no;
access_log /var/log/nginx/observium.access.log;
error_log /var/log/nginx/observium.error.log;
root /opt/observium/html;
index index.php;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/nginx/html;
}
location / {
try_files $uri $uri/ @observium;
}
location @observium {
rewrite ^(.+)$ /index.php/$1/ last;
}
location ~ \.php(.*)$ {
fastcgi_pass unix:/var/run/observium.sock;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME /opt/observium/html$fastcgi_script_name$1;
fastcgi_param PATH_TRANSLATED /opt/observium/html$fastcgi_path_info;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment