forked from vernondcole/formhub
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vernondcole
committed
Mar 13, 2014
1 parent
71de2b4
commit 3c208fc
Showing
3 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# formhub_nginx.conf | ||
#Symlink to this file from /etc/nginx/sites-enabled so nginx can see it: | ||
#$ sudo ln -s /opt/formhub/formhub/formhub_nginx.conf /etc/nginx/sites-enabled/ | ||
|
||
# the upstream component nginx needs to connect to | ||
upstream django { | ||
server unix:///opt/formhub/formhub.sock ; # for a file socket | ||
#server 127.0.0.1:8001; # for a web port socket (we'll use this first) | ||
} | ||
|
||
# configuration of the server | ||
server { | ||
# the port your site will be served on | ||
#listen 8001; | ||
# the domain name it will serve for | ||
server_name formhub.eocng.org forms.ehealthafrica.org forms.ehealth.org.ng; | ||
#server_name forms-staging.eocng.org; | ||
charset utf-8; | ||
|
||
# max upload size | ||
client_max_body_size 75M; # adjust to taste | ||
|
||
# Django media | ||
location /media { | ||
alias /var/formhub-media; # your Django project's media files - amend as required | ||
} | ||
|
||
location /static { | ||
alias /srv/formhub-static; # your Django project's static files - amend as required | ||
expires 30d; | ||
} | ||
|
||
# Finally, send all non-media requests to the Django server. | ||
location / { | ||
uwsgi_pass django; | ||
include /opt/formhub/formhub/uwsgi_params; # the uwsgi_params file you installed | ||
uwsgi_read_timeout 300; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# link or copy this file to the /ect/nginx directory | ||
|
||
user www-data; | ||
worker_processes 4; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 768; | ||
# multi_accept on; | ||
} | ||
|
||
http { | ||
|
||
## | ||
# Basic Settings | ||
## | ||
index index.html index.htm; | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
# server_tokens off; | ||
charset UTF-8; | ||
|
||
server_names_hash_bucket_size 64; | ||
# server_name_in_redirect off; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
## | ||
# Logging Settings | ||
## | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
## | ||
# Gzip Settings | ||
## | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
## | ||
# Virtual Host Configs | ||
## | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
include /etc/nginx/sites-enabled/*; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
user www-data; | ||
worker_processes 4; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 768; | ||
# multi_accept on; | ||
} | ||
|
||
http { | ||
|
||
## | ||
# Basic Settings | ||
## | ||
|
||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
# server_tokens off; | ||
|
||
# server_names_hash_bucket_size 64; | ||
# server_name_in_redirect off; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
## | ||
# Logging Settings | ||
## | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
## | ||
# Gzip Settings | ||
## | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
# gzip_vary on; | ||
# gzip_proxied any; | ||
# gzip_comp_level 6; | ||
# gzip_buffers 16 8k; | ||
# gzip_http_version 1.1; | ||
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | ||
|
||
## | ||
# nginx-naxsi config | ||
## | ||
# Uncomment it if you installed nginx-naxsi | ||
## | ||
|
||
#include /etc/nginx/naxsi_core.rules; | ||
|
||
## | ||
# nginx-passenger config | ||
## | ||
# Uncomment it if you installed nginx-passenger | ||
## | ||
|
||
#passenger_root /usr; | ||
#passenger_ruby /usr/bin/ruby; | ||
|
||
## | ||
# Virtual Host Configs | ||
## | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
include /etc/nginx/sites-enabled/*; | ||
} | ||
|
||
|
||
#mail { | ||
# # See sample authentication script at: | ||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript | ||
# | ||
# # auth_http localhost/auth.php; | ||
# # pop3_capabilities "TOP" "USER"; | ||
# # imap_capabilities "IMAP4rev1" "UIDPLUS"; | ||
# | ||
# server { | ||
# listen localhost:110; | ||
# protocol pop3; | ||
# proxy on; | ||
# } | ||
# | ||
# server { | ||
# listen localhost:143; | ||
# protocol imap; | ||
# proxy on; | ||
# } | ||
#} |