Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
simple conf for a static site on heroku using nginx with this buildpack: File structure: app/conf/nginx.conf.erb app/conf/mime.types app/html/index.html
worker_processes 4;
daemon off;
events {
worker_connections 1024;
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
tcp_nopush on;
keepalive_timeout 30;
gzip on;
include mime.types;
default_type application/octet-stream;
server {
server_name localhost;
listen <%= ENV['PORT'] %>;
root <%= ENV['HOME'] %>/html;
index index.html;
# this file is used by the nginx.conf
types {
text/html html htm shtml;
text/css css;
text/xml xml rss;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
text/cache-manifest manifest appcache;
text/mathml mml;
text/plain txt;
text/ jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/png png;
image/svg+xml svg svgz;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/webp webp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
application/java-archive jar war ear;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/ xls;
application/ ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.wap.xhtml+xml xhtml;
application/x-chrome-extension crx;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;
application/octet-stream safariextz
audio/midi mid midi kar;
audio/mpeg mp3;
audio/x-realaudio ra;
audio/ogg oga ogg;
video/3gpp 3gpp 3gp;
video/mpeg mpeg mpg;
video/ogg ogv;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
application/ eot;
font/truetype ttf;
font/opentype otf;
font/woff woff;
<h1>hello world.</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.