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 3rd December 2012, 16:20
Eike Eike is offline
Junior Member
 
Join Date: Nov 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question The Perfect SpamSnake - Ubuntu 12.04 - Nginx, uWSGI & Baruwa

Hey guys,

first of all I'm still "learning" and got stuck on this great howto. I did it a few years ago with Ubuntu 8.04 and the server still works well. Now I am trying to put a new version on a new server with Ubuntu 12.04.
Most of the 10.10-howto still works good but I am having problems with the installation of Nginx, uWSGI & Baruwa. The biggest problem ist that there are no Packages for 12.04 on https://launchpad.net/~chris-lea/+archive/uwsgi. I tried using the Ubuntu repository, but then folders like /etc/uwsgi/uwsgi-python2.6/ are missing because there is no uwsgi-python2.6 on 12.04.
I would even install more from the repository, but when I install Baruwa, it doesn't find Mailscanner, needs to install/replace it and crashes because it cannot remove the folders. When I even install Mailscanner (from the Baruwa repo) with Aptitude the folders completely differ from the howto.
Can anyone help me, especially with uWSGI? Or is it easy to use Apache, instead of nginx?

Thanks a lot & best regards
Eike
Reply With Quote
Sponsored Links
  #2  
Old 4th December 2012, 15:33
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

What errors do you get with uwsgi and nginx?
__________________
Home of the SpamSnake
Reply With Quote
  #3  
Old 5th December 2012, 09:46
Eike Eike is offline
Junior Member
 
Join Date: Nov 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is no Precise-/Quantal-.deb for uWSGI on Chris Lea's Launchpad and when I install nginx and uWSGI with Aptitude I need Python 2.7, instead of 2.6. The folder /etc/uwsgi/uwsgi-python2.6/ doesn't exist and currently my Linux skills are (by far...) not good enough to find the solution...

Is it difficult to use Apache, instead of nginx? Or would it end up in a mess when I try to install Mailscanner, Baruwa and Apache with Aptitude?
Reply With Quote
  #4  
Old 7th December 2012, 12:12
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default Try This

Let me know if the following steps are successful:

apt-get install nginx uwsgi uwsgi-extra uwsgi-plugin-python

vi /etc/nginx/sites-available/baruwa.conf

[uwsgi]
workers = 2
chdir = /usr/share/pyshared/baruwa
env = DJANGO_SETTINGS_MODULE=baruwa.settings
module = django.core.handlers.wsgi:WSGIHandler()

vi /etc/uwsgi/apps-available/baruwa.ini

server {
server_name spamsnake.mcrirents.com;
access_log /var/log/nginx/access.log;
location / {
uwsgi_pass unix:///var/run/uwsgi/app/baruwa/socket;
include uwsgi_params;
}
}

Create symlinks
rm -r /etc/nginx/sites-enabled/default
cp /usr/share/doc/uwsgi-extra/nginx/uwsgi_params /etc/nginx/
ln -s /etc/nginx/sites-available/baruwa.conf /etc/nginx/sites-enabled/baruwa.conf
ln -s /etc/uwsgi/apps-available/baruwa.ini /etc/uwsgi/apps-enabled/baruwa.ini

Restart both nginx and uwsgi
/etc/init.d/nginx restart && /etc/init.d/uwsgi restart
__________________
Home of the SpamSnake

Last edited by Rocky; 7th December 2012 at 12:14.
Reply With Quote
  #5  
Old 11th December 2012, 09:28
Eike Eike is offline
Junior Member
 
Join Date: Nov 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Rocky,
thanks for answering. Sorry, I had not much time in the last few days.

I've changed the files and commented out the content of /etc/nginx/sites-available/baruwa.conf.
But when I restart nginx and uwsgi I get this:

Code:
Restarting nginx: nginx: [emerg] unknown directive "[uwsgi]" in /etc/nginx/sites-enabled/baruwa.conf:25
nginx: configuration file /etc/nginx/nginx.conf test failed
Do you know what I did wrong?
Reply With Quote
  #6  
Old 11th December 2012, 21:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Can you post your /etc/nginx/sites-enabled/baruwa.conf file?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 8th January 2013, 15:39
lctn lctn is offline
Junior Member
 
Join Date: May 2008
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default postfix.sh errors

I am getting the following errors when running postfix.sh. It keeps the script from finishing, unless I comment spf info out.


root@relay-1:/etc/postfix# /usr/src/postfix.sh
postconf: warning: ???e: unknown parameter
postconf: warning: policy-spf_time_limit = 3600s: unknown parameter
postconf: fatal: -e or -# accepts no comment input


FYI: There is a typo with instructions on installing baruwa.

Had to change it to the following to get it to work:

mv uc?id=0B9cN15Q3pKnwLW1WNG9rN0dQNzg baruwa_1.1.2-4sn_all.deb
mv uc?id=0B9cN15Q3pKnwMHFUMFhWMW4ycU0 baruwa-doc_1.1.2-4sn_all.deb
Reply With Quote
  #8  
Old 9th January 2013, 15:26
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hi,

Try retyping the spf section within your ssh session and see if that fixes it. Sometimes copy and paste could cause some issues.
__________________
Home of the SpamSnake
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
Spamsnake 10.10 Baruwa issues after update tuxic HOWTO-Related Questions 5 11th September 2011 02:21
The Perfect SpamSnake - Ubuntu Jeos 10.04 - Nginx, uWSGI & Baruwa Drex56 HOWTO-Related Questions 17 8th February 2011 22: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
SpamSnake SpamAssassin not working? getrav HOWTO-Related Questions 5 23rd June 2008 23:02


All times are GMT +2. The time now is 21:38.


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