Tree.io community has moved to GitHub's Issues, please use this for all new questions.

×
← Return to Tree.io
login about faq
3
1

my example installation with subdomain to help others:


apache vitualhost


<VirtualHost *:80>

ServerName http://projects.example.com

DocumentRoot /home/foo/treeio

<Directory /home/foo/treeio> Order allow,deny Allow from all </Directory>

WSGIDaemonProcess treeio.djangoserver processes=2 threads=15 display-name=%{GROUP} WSGIProcessGroup treeio.djangoserver

WSGIScriptAlias / /home/foo/treeio/wsgi

</VirtualHost>


wsgi file


import os

import sys

sys.path = ['/home/foo/treeio/.ve/lib/python2.6/site-packages/'] + sys.path

sys.path.append('/home/foo/')

sys.path.append('/home/foo/treeio')

os.environ['DJANGO_SETTINGS_MODULE'] = 'treeio.settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()


media paths in settings.py


MEDIA_ROOT = '/home/foo/treeio/static/media/'

MEDIA_URL = 'htpp://projects.example.com/static/media/'


Install python-imaging too.

In sys.path, i had to put the path for the virtual enviroment, to load that libs first, and later the system ones, because i got errors not finding pandora and some other stuff.

Rember to add write permissions to folder "foo", and subfolders for the user of the apache process.

cheers

asked Feb 14 '12 at 05:35

zigggs's gravatar image

zigggs
46124

edited Feb 16 '12 at 13:48

Thanks for this zigggs, this will be very useful for anyone wanting to use Apache. I'm adding a link to this post on the GitHub README page. Thumbs up!

(Feb 16 '12 at 13:57) Adam ♦♦

Self-Answered above ^^^

answered Feb 16 '12 at 13:58

Adam's gravatar image

Adam ♦♦
1.5k26

Hello,

I am a treeio/django newbie and, despite the great tips, still have trouble making the treeio work in my system, so i wasn't able to test it yet.

I use Linux mint, lisa, apache for other web based applications and did all the steps propsed, here and in GitHub.

Problem is, when I restart my apache, with all the files in the right places and with the proper adjustment (or so I believe), i get this error:

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information.

Help, anyone?

My codes:

-- apache virtualhost file (treeio in /etc/apache2/sites-available )-----------------------------------

Listen 8080
WSGIRestrictStdout Off

<VirtualHost *:8080>

ServerName http://projects.example.com

DocumentRoot /home/alexandre/projects/treeio

<Directory /home/alexandre/projects/treeio> 
   Order allow,deny 
   Allow from all 
</Directory>

WSGIDaemonProcess treeio.djangoserver processes=2 threads=15 display-name=%{GROUP} 
WSGIProcessGroup treeio.djangoserver

WSGIScriptAlias / /home/alexandre/projects/treeio/treeio.wsgi

</VirtualHost>

-- wsgi file (treeio.wsgi in /home/alexandre/projects/treeio)---------------------------------------

 import os

import sys

sys.path = ['/home/alexandre/projects/treeio/.ve/lib/python2.6/site-packages/'] + sys.path

sys.path.append('/home/alexandre/projects/')

sys.path.append('/home/alexandre/projects/treeio')

os.environ['DJANGO_SETTINGS_MODULE'] = 'treeio.settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()

Thanks in advance and I am sorry if I put this line of questioning in the wrog place.

o/

answered Aug 02 '13 at 15:07

Alexandre's gravatar image

Alexandre
1

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×10
×8
×2

Asked: Feb 14 '12 at 05:35

Seen: 2,993 times

Last updated: Aug 02 '13 at 15:07

© 2013 Tree.io Ltd. All rights reserved.
Registered in England. Company No. 07416236