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
rafaelcaricio@ubuntu:~$ sudo apt-get install memcached | |
rafaelcaricio@ubuntu:~$ memcached -d -m 512 -l 127.0.0.1 -p 11211 |
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
rafaelcaricio@ubuntu:~$ ps ax | grep memcached | |
4185 ? Ssl 0:00 memcached -d -m 512 -l 127.0.0.1 -p 11211 |
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
rafaelcaricio@ubuntu:~$ sudo apt-get install nginx |
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
rafaelcaricio@ubuntu:~$ sudo easy_install python-memcached | |
rafaelcaricio@ubuntu:~$ sudo easy_install gunicorn |
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
rafaelcaricio@ubuntu:~$ sudo /etc/init.d/nginx stop | |
Stopping nginx: nginx. | |
rafaelcaricio@ubuntu:~$ sudo /etc/init.d/nginx start | |
Starting nginx: the configuration file /etc/nginx/nginx.conf syntax is ok | |
configuration file /etc/nginx/nginx.conf test is successful | |
nginx. |
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
rafaelcaricio@ubuntu:~$ sudo vim /etc/nginx/sites-available/easyproject.conf |
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
upstream easy_gunicorn { | |
server 127.0.0.1:9000; | |
} | |
server { | |
listen 80; | |
server_name localhost 127.0.0.1; | |
client_max_body_size 10M; | |
access_log /var/log/nginx/easyproject.access.log; |
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
*** HARAKIRI ON WORKER 2 (pid: 13221) *** | |
HARAKIRI: --- uWSGI worker 2 (pid: 13221) WAS managing request /estudante/ since Tue Nov 2 13:24:09 2010 --- | |
DAMN ! process 13221 died :( trying respawn ... | |
Respawned uWSGI worker (new pid: 13235) |
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
#!/usr/bin/python | |
import sys | |
import os | |
from django.conf import settings | |
try: | |
import settings # Assumed to be in the same directory. | |
sys.path.insert(0, os.path.join(settings.PROJECT_ROOT, "apps")) | |
except ImportError: | |
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) | |
sys.exit(1) |
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
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
import re | |
from django.core.cache import cache | |
from django.conf import settings | |
class NginxCacheMiddleware: | |
def process_response(self, request, response): | |
cacheIt = True |
OlderNewer