Skip to content

Instantly share code, notes, and snippets.

@frankrowe
Last active December 18, 2015 15:58
Show Gist options
  • Save frankrowe/5807951 to your computer and use it in GitHub Desktop.
Save frankrowe/5807951 to your computer and use it in GitHub Desktop.
nginx.conf example
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
root /Users/fsrowe/Documents/Web/;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
index index.html index.htm;
}
location /dashboards/carolinedes/ {
alias /Users/fsrowe/Documents/Web/dashboards/carolinedes/frontend/;
index index.html index.htm;
}
location /dashboards/carolinedes/api/ {
proxy_pass http://localhost:3001/;
proxy_redirect default;
}
location /dashboards/countycomparison/api/ {
proxy_pass http://localhost:3002/;
proxy_redirect default;
}
location /dashboards/baystat/api/ {
proxy_pass http://localhost:3003/;
proxy_redirect default;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location = /50x.html {
root html;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment