Permalink
Browse files

Sync with production

  • Loading branch information...
1 parent 0542310 commit 3cc4d8b5d8d75b431f516aa814df004d06d6f307 @alexkay committed Aug 28, 2014
Showing with 37 additions and 13 deletions.
  1. +2 −2 README.md
  2. +1 −1 main.py
  3. +16 −0 nginx-dev.conf
  4. +17 −9 nginx.conf
  5. +1 −1 run-uwsgi
View
@@ -16,10 +16,10 @@ Edit your main `nginx.conf`:
http {
...
- include /path/to/hilite.me/nginx.conf;
+ include /path/to/hilite.me/nginx-dev.conf;
}
-Update the project location in `hilite.me/nginx.conf` and restart nginx.
+Update the project location in `hilite.me/nginx-dev.conf` and restart nginx.
Add this line to your `/etc/hosts`:
View
@@ -91,4 +91,4 @@ def convert(item):
return response
if __name__ == "__main__":
- app.run(host='0.0.0.0', debug=True)
+ app.run(host='0.0.0.0')
View
@@ -0,0 +1,16 @@
+server {
+ root /home/alex/Projects/hilite.me/static;
+ server_name hilite.dev;
+
+ proxy_set_header Host $host;
+
+ location / {
+ if (-f $request_filename) {
+ access_log off;
+ }
+
+ if (!-f $request_filename) {
+ proxy_pass http://127.0.0.1:5000;
+ }
+ }
+}
View
@@ -1,16 +1,24 @@
server {
- root /home/alex/Projects/hilite.me/static;
- server_name hilite.dev;
+ listen 80;
+ server_name www.hilite.me;
+ rewrite ^ http://hilite.me$request_uri?;
+}
+
+server {
+ listen 80;
+ server_name hilite.me;
+
+ access_log /var/log/nginx/access-hilite.me.log;
+ error_log /var/log/nginx/error-hilite.me.log;
proxy_set_header Host $host;
- location / {
- if (-f $request_filename) {
- access_log off;
- }
+ location ~* \.(ico|png|txt)$ {
+ root /home/alex/hilite.me/static;
+ }
- if (!-f $request_filename) {
- proxy_pass http://127.0.0.1:5000;
- }
+ location / {
+ uwsgi_pass unix:/tmp/hilite.me.sock;
+ include uwsgi_params;
}
}
View
@@ -9,7 +9,7 @@ exec setuidgid www /usr/local/bin/uwsgi \
--pythonpath="$DIR" \
--home=env \
--master \
- --processes=3 \
+ --processes=5 \
--harakiri=30 \
--max-requests=1000 \
--module="main:app"

0 comments on commit 3cc4d8b

Please sign in to comment.