From 79caa9d6bf974bad1ef5e56acabfc7942da590c8 Mon Sep 17 00:00:00 2001 From: Rushil Umaretiya Date: Tue, 26 Jan 2021 15:44:53 -0500 Subject: [PATCH] fixed dockerfile and nginx conf --- Dockerfile | 3 ++- mime.types | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ nginx.conf | 6 +++++- 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 mime.types diff --git a/Dockerfile b/Dockerfile index 31fd304..7ed9397 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ from nginx:alpine COPY public/ /usr/share/nginx/html -ADD nginx.conf /etc/nginx.conf +ADD nginx.conf /etc/nginx/nginx.conf +ADD mime.types /etc/nginx/mime.types diff --git a/mime.types b/mime.types new file mode 100644 index 0000000..25ae94e --- /dev/null +++ b/mime.types @@ -0,0 +1,48 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml rss; + image/gif gif; + image/jpeg jpeg jpg; + application/x-javascript js; + text/plain txt; + text/x-component htc; + text/mathml mml; + image/png png; + image/x-icon ico; + image/x-jng jng; + image/vnd.wap.wbmp wbmp; + application/java-archive jar war ear; + application/mac-binhex40 hqx; + application/pdf pdf; + 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 deb; + application/octet-stream bin exe dll; + application/octet-stream dmg; + application/octet-stream eot; + application/octet-stream iso img; + application/octet-stream msi msp msm; + audio/mpeg mp3; + audio/x-realaudio ra; + video/mpeg mpeg mpg; + video/quicktime mov; + video/x-flv flv; + video/x-msvideo avi; + video/x-ms-wmv wmv; + video/x-ms-asf asx asf; + video/x-mng mng; +} diff --git a/nginx.conf b/nginx.conf index c98215c..f171473 100644 --- a/nginx.conf +++ b/nginx.conf @@ -3,13 +3,17 @@ worker_processes 1; events { worker_connections 1024; } http { - #include mime.types; + include mime.types; sendfile on; server { root /usr/share/nginx/html/; index index.html; + server_name localhost; + listen 80; listen [::]:80; + + error_page 404 /404/index.html; } }