Commit d305ad72 authored by Thomas Lechauve's avatar Thomas Lechauve

Add mimes types to nginx configuration.

parent 506ef1f1
......@@ -2,6 +2,7 @@
parts =
nginx_conf
html5as_bin
mime_types
publish-connection-information
eggs-directory = ${buildout:eggs-directory}
......@@ -68,6 +69,7 @@ docroot = $${basedirectory:data}
default_index = $${basedirectory:data}/index.html
# Config files
path_nginx_conf = $${rootdirectory:etc}/nginx.conf
path_mime_types = $${rootdirectory:etc}/mime_types
# Executables
bin_nginx = ${nginx:location}/sbin/nginx
bin_html5as = $${basedirectory:services}/html5as
......@@ -85,6 +87,11 @@ context =
section param_html5as html5as
section param_tempdir tempdirectory
[mime_types]
recipe = slapos.recipe.template:jinja2
template = ${template_mime_types:location}/${template_mime_types:filename}
rendered = $${html5as:path_mime_types}
[html5as_bin]
recipe = slapos.recipe.template:jinja2
template = ${template_html5as_bin:location}/${template_html5as_bin:filename}
......
......@@ -28,6 +28,7 @@ parts =
template
template_nginx_conf
template_html5as_bin
template_mime_types
instance_html5as
[eggs]
......@@ -45,13 +46,13 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance_html5as.cfg
output = ${buildout:directory}/template_html5as.cfg
md5sum = 4e797931c1497f3d637c3695afa77977
md5sum = dd362b85a84d30936084aac91a0c711c
mode = 0644
[template_nginx_conf]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/nginx_conf.in
md5sum = 6cf7acfa6ca350687d0900bf5221f0e4
md5sum = 0ae1fb1c777c332d76f680c681a4f48a
filename = nginx_conf.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......@@ -64,6 +65,14 @@ filename = html5as_bin.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[template_mime_types]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/mime_types.in
md5sum = 4ef94a7b458d885cd79ba0b930a5727e
filename = mime_types.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[versions]
zc.buildout = 1.6.0-dev-SlapOS-006
Jinja2 = 2.6
......
types {
text/html html htm shtml;
text/css css;
text/xml xml rss;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg svgz;
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/vnd.ms-excel xls;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
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/xhtml+xml xhtml;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream eot;
application/octet-stream iso img;
application/octet-stream msi msp msm;
application/ogg ogx;
audio/midi mid midi kar;
audio/mpeg mpga mpega mp2 mp3 m4a;
audio/ogg oga ogg spx;
audio/x-realaudio ra;
audio/webm weba;
video/3gpp 3gpp 3gp;
video/mp4 mp4;
video/mpeg mpeg mpg mpe;
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;
}
......@@ -11,7 +11,7 @@ events {
}
http {
#include mime.types;
include {{ param_html5as['path_mime_types'] }};
default_type application/octet-stream;
access_log {{ param_html5as['path_access_log'] }} combined;
index index.html;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment