Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd December 2010, 20:40
tahussle tahussle is offline
Junior Member
 
Join Date: Jun 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default The Perfect SpamSnake - Ubuntu Jeos 10.10 Maverick Meerkat

502 Bad Gateway - nginx&baruwa

--------------------------------------------------------------------------------

Hi i am trying to setup a spam snake as per the link below. the instructions is not the clearest but i have tried to follow word for word

http://www.howtoforge.com/the-perfec...ick-meerkat-p4

however when i try to log into the front end i get

502 Bad Gateway

--------------------------------------------------------------------------------

nginx/0.8.53




tail -f /var/log/nginx/error.log

shows

connect() to unix:///var/run/baruwa.sock failed (2: No such file or directory) while connecting to upstream


any help appreciated
Reply With Quote
Sponsored Links
  #2  
Old 2nd December 2010, 23:01
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,

Whats the content of /etc/uwsgi/uwsgi-python2.6/baruwa.ini?

Try running /etc/init.d/uwsgi-python2.6 restart and try hitting the site.

If that fails, what happens when you do this: /etc/init.d/nginx restart
__________________
Home of the SpamSnake
Reply With Quote
  #3  
Old 2nd December 2010, 23:39
tahussle tahussle is offline
Junior Member
 
Join Date: Jun 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default hi thanks for the reply

this is the content of /etc/uwsgi/uwsgi-python2.6/baruwa.ini

[uwsgi]
socket = /var/run/baruwa.sock
master = true
processes = 2
env = DJANGO_SETTINGS_MODULE=baruwa.settings
module = django.core.handlers.wsgi:WSGIHandler()


and on running the restart same problem
spamsnake:/etc/nginx/sites-enabled# /etc/init.d/uwsgi-python2.6 restart
* Restarting WSGI server(s) uwsgi-python2.6 [ OK ]




**@spamsnake:/etc/nginx/sites-enabled# /etc/init.d/nginx restart
Restarting nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
configuration file /etc/nginx/nginx.conf test is successful
nginx.




and this is the baruwa.conf file in the nginx sites-enabled folder


server {
listen 80;
server_name myhostname.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/baruwa.sock;
include uwsgi_params;
}
}
Reply With Quote
  #4  
Old 3rd December 2010, 02:32
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Please change the socket line in /etc/uwsgi/uwsgi-python2.6/baruwa.ini and /etc/nginx/sites-enabled/baruwa.conf to:

/var/run/uwsgi/uwsgi-python2.6/baruwa/baruwa.sock

Restart both uwsgi-python2.6 and nginx and you should be good to go.

That should take care of the issues you're having.
__________________
Home of the SpamSnake

Last edited by Rocky; 3rd December 2010 at 03:07.
Reply With Quote
  #5  
Old 3rd December 2010, 12:06
tahussle tahussle is offline
Junior Member
 
Join Date: Jun 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default thanks

cheers all working
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clamav issue with The Perfect SpamSnake - Ubuntu Jeos 9.10 Maxum HOWTO-Related Questions 7 21st March 2011 16:21
Connection timed out on intermail outgoing mails gouravgarg Server Operation 6 5th March 2010 20:31
MailScanner trouble with DBD-MYSQL sergio.arnaldo Server Operation 11 26th August 2009 18:08
Howtoforge the perfect Server(links) rini90 Installation/Configuration 0 14th December 2008 10:58
SpamSnake SpamAssassin not working? getrav HOWTO-Related Questions 5 23rd June 2008 23:02


All times are GMT +2. The time now is 02:31.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.