I'm trying to install and get running Tendenci on a DigitalOcean server. Tendenci is this open source association management software: http://tendenci.com/

I've followed the instructions here to the letter: http://tendenci.readthedocs.org/en/latest/installation/remote.html

And have hit a roadblock as I get an Internal Server Error every time I visit the site at

I think the problem is either my /var/www permissions are not set correctly or that nginx isn't listening to port 80 requests. (OR both?).

The server is running Ubuntu 12.04.4 x64 and when I logged in, I had to create the /var/www folder. Later on, thinking this could be the cause of the Internal Server Error I set its permissions by

chown root:www-data www
chmod 755 www

I had also applied these same permissions to /var/www/tendenci (where Tendenci is installed), as per the guide instructions at the beginning.

That didn't change anything, so I added

listen [::]:80 ipv6only=on default_server;

To /etc/nginx/sites-available/tendenci based on what I read over here: https://stackoverflow.com/questions/14972792/nginx-nginx-emerg-bind-to-80-failed-98-address-already-in-use

Which hasn't helped. I'm stumped, because I'm not a sysadmin. Is there something basic that I'm missing? Is the issue with /var/www permissions or with the way /etc/nginx/sites-available/tendenci is configured?

Note: this is the 3rd time I follow the instructions. The second time I tried with a LAMP setup and when I visited the site at, that showed the directory and files instead of the actual frontend of the site itself. On another note: the site should be displayed when visiting directly.

Any help or pointers in the right direction would be appreciated, thanks!

  • Did you install and setup python correctly? I am assuming that this site is python based. – 111--- Apr 10 '14 at 20:18
  • Try looking in these two logs to see if anything helpful shows up: access_log - /var/log/nginx/access.log; error_log - /var/log/nginx/error.log; – 111--- Apr 10 '14 at 20:24
  • @datUser: As far as I know, python is correctly setup and installed. I followed the commands on the guide, and I think one of them automatically sets up a lot of things. I also had to run several python commands, and I just checked and Python 2.7.3 is installed with GCC 4.6.3. The access.log shows a bunch of GET requests (from me refreshing). Nothing on the error.log – Optimae Apr 10 '14 at 20:47
  • Can you post the output for ls -al /var/www/tendenci so we can see the permissions in the server root? – 111--- Apr 10 '14 at 20:53
  • pastebin.com/sF7ukUcH – Optimae Apr 10 '14 at 21:10

At this point it is time to rule some things out. Lets see if the problem lies with NGINX, python or some other server config problem.

  1. Make a new server root in /var/www/foo with a simple text file as the only file in the directory.

    mkdir /var/www/foo
    chown www-data:www-data /var/www/foo
    touch /var/www/foo/index.html
    chown www-data:www-data /var/www/foo/index.html
    echo "<html>Hi there</html>" > /var/www/foo/index.html
  2. Now change the nginx server config to serve the new directory rather than the one you were serving at var/www/tendenci. If you need help with this i think that the documentation that you followed above walked you through that step.

  3. Restart nginx with /etc/init.d/nginx restart or something like that. Check your public IP address and see if you have the server error or the simple html file. I would work on getting the server to serve this simple text file before I spent any time troubleshooting anything else at the moment.

If you cannot get the server to serve the simple text file then you probably want to reinstall the web server and make sure something didn't get screwed up in the server installation. A stray ";" in a config file can be hell to find sometimes.

If you can get the simple text file to get served, celebrate, then I would look into either the python installation which python or the python files in the server root. If there is something wrong with the python files in the server root and it is not valid for some reason then it would throw a server error. If this is the case then you may want to check the python error logs. Perhaps at /var/log/nginx/python.err, but I'm not entirely sure where they would live.

Hopefully this gets you on the right track.

| improve this answer | |
  • Thanks, going to try this out ASAP (currently on the move with no stable internet). Will post results. – Optimae Apr 14 '14 at 18:08
  • Currently trying to get nginx to serve the simple text file. No joy yet, but I'm going to look into the nginx configuration files as I think something may be off there. Will also check the python installation. I'll keep this updated. – Optimae Apr 17 '14 at 19:05
  • I was able to serve a simple text file and I couldn't find anything wrong in the error logs. I did however find a similar thread on github (github.com/tendenci/tendenci/issues/327). I tried everything on there but I'm still getting the error. As I think there's something misconfigured with Tendenci, I've asked directly on github too, over here: github.com/tendenci/tendenci/issues/351 – Optimae Apr 28 '14 at 13:56
  • @Optimae Glad to hear the web server is working correctly, I was thinking that this might be an application (i.e. Tendenci) issue. You might want to try serving a simple python script next to check if your python installation is working correctly. – 111--- Apr 28 '14 at 14:20

I don't know which size droplet you had, but you might be having errors that aren't really logic or syntax problems if you are running a small one. Adding swap and reinstalling might help.

I encountered errors during the db migration portion of the python deploy.py portion of the install doc. Running the commands within deploy gave me different errors instead of a consistent error in the db migration. Adding a swapfile to my wee droplet appears to have fixed it for me. I was able to run deploy successfully.

I followed the swapfile portion of this article.

The quick fix is to run the following:

sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024k sudo mkswap /swapfile sudo swapon /swapfile

Your swapfile is now running and active, but to set it so that it's activated on each boot we need to edit /etc/fstab:

sudo nano /etc/fstab

Paste the following onto the bottom of the file:

/swapfile none swap sw 0 0

Now restart your VPS:

sudo restart

Full explanation here: https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04

| improve this answer | |

In the end it turned out that a column in the database was missing (for an unknown reason). After adding it manually, the problem persisted, so one of the developers recommended I use these installation scripts instead: https://github.com/tendenci/deploy_tendenci

There were some minor issues, but after fixing those everything is running smoothly!

For anyone wanting to install Tendenci in the future, I suggest using this method: https://github.com/tendenci/deploy_tendenci and checking https://github.com/tendenci/tendenci/issues/351 for common troubleshooting tips.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.