From 2b1bc7ec5ad99de2040402d79fd83c69271a6dde Mon Sep 17 00:00:00 2001 From: Jeremy Tan Date: Tue, 27 Aug 2013 19:44:20 +0800 Subject: [PATCH] Move nginx configs and update makefile (crypto lib) --- nginx-configs/README | 18 +++++ .../fastcgi_params | 0 nginx-configs/mime.types | 80 +++++++++++++++++++ .../sites-enabled/mctxconfig | 0 server/Makefile | 2 +- 5 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 nginx-configs/README rename {testing/fastcgi-approach/-etc-nginx => nginx-configs}/fastcgi_params (100%) create mode 100644 nginx-configs/mime.types rename testing/fastcgi-approach/-etc-nginx/sites-enabled/default => nginx-configs/sites-enabled/mctxconfig (100%) diff --git a/nginx-configs/README b/nginx-configs/README new file mode 100644 index 0000000..1c6ade5 --- /dev/null +++ b/nginx-configs/README @@ -0,0 +1,18 @@ +This folder represents the files that should be placed under: +/etc/nginx + +To install: +* Delete all files under /etc/nginx/sites-enabled +* Either: + * Copy 'mctxconfig' (under sites-enabled) to /etc/nginx/sites-available/ + and create a symlink to that file under /etc/nginx/sites-enabled/ + * Create a symlink directly from 'mctxconfig' to + /etc/etc/nginx/sites-enabled/ +* Replace /etc/nginx/fastcgi_params and /etc/nginx/mime.types with the + provided files (either by copying or symlinking) + +Note: +To get the login functionality working, you need to place a .htpasswd file +under /usr/share/nginx/access (create folder if it doesn't exist). To generate +the htpasswd file, install the apache2-utils package and use the 'htpasswd' +executable. diff --git a/testing/fastcgi-approach/-etc-nginx/fastcgi_params b/nginx-configs/fastcgi_params similarity index 100% rename from testing/fastcgi-approach/-etc-nginx/fastcgi_params rename to nginx-configs/fastcgi_params diff --git a/nginx-configs/mime.types b/nginx-configs/mime.types new file mode 100644 index 0000000..9d05612 --- /dev/null +++ b/nginx-configs/mime.types @@ -0,0 +1,80 @@ +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 log; + 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/json json; + 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; +} diff --git a/testing/fastcgi-approach/-etc-nginx/sites-enabled/default b/nginx-configs/sites-enabled/mctxconfig similarity index 100% rename from testing/fastcgi-approach/-etc-nginx/sites-enabled/default rename to nginx-configs/sites-enabled/mctxconfig diff --git a/server/Makefile b/server/Makefile index e85a72e..ef834a1 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,7 +1,7 @@ # Makefile for server software CXX = gcc FLAGS = -std=c99 -Wall -Werror -pedantic -g -LIB = -lpthread -lfcgi -lssl +LIB = -lpthread -lfcgi -lssl -lcrypto OBJ = log.o sensor.o fastcgi.o thread.o main.o RM = rm -f -- 2.20.1