View Single Post
  #8  
Old 8th March 2011, 19:57
tuxic tuxic is offline
Junior Member
 
Join Date: Mar 2011
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Rocky View Post
Do you have /etc/nginx/uwsgi_params?

Remember it has to be in this format in your nginx conf file:
uwsgi_pass unix:////var/run/uwsgi/uwsgi-python2.6/baruwa/socket;
vim /etc/nginx/uwsgi_params
Code:
uwsgi_param  QUERY_STRING       $query_string;
uwsgi_param  REQUEST_METHOD     $request_method;
uwsgi_param  CONTENT_TYPE       $content_type;
uwsgi_param  CONTENT_LENGTH     $content_length;

uwsgi_param  REQUEST_URI        $request_uri;
uwsgi_param  PATH_INFO          $document_uri;
uwsgi_param  DOCUMENT_ROOT      $document_root;
uwsgi_param  SERVER_PROTOCOL    $server_protocol;

uwsgi_param  REMOTE_ADDR        $remote_addr;
uwsgi_param  REMOTE_PORT        $remote_port;
uwsgi_param  SERVER_PORT        $server_port;
uwsgi_param  SERVER_NAME        $server_name;
vim /etc/nginx/sites-enabled/baruwa.conf
Code:
server {
      listen 80;
      server_name spamsnaketest.com;
      root /usr/share/pyshared/baruwa;
      #main access log
      access_log  /var/log/nginx/access.log;
      #main error log
      error_log /var/log/nginx/error.log;
   location /static {
      root  /usr/share/pyshared/baruwa/static/;
      }
   # static resources
   location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
      {
      expires 30d;
      break;
      }
   location / {
uwsgi_pass unix:///var/run/uwsgi/uwsgi-python2.6/baruwa/socket;
include uwsgi_params;
      }
   }
This is with 3 backslashes according to the guide.

Any other suggestions, pulling my hair out over this.
Reply With Quote