Hej Martin!

I had the exact same problem when I upgraded to 2.5.0 last week and managed to solve it. I'm on Debian squeeze, so it uses python 2.6.
The installation is in /var/www/pootle.

My wsgi.py is this:

import os
import site
import sys

ALLDIRS = [
    '/var/www/pootle/env/lib/python2.6/site-packages',
'/var/www/pootle/env/lib/python2.6/site-packages/pootle/apps'
]

# Remember original sys.path.
prev_sys_path = list(sys.path)

# Add each new site-packages directory.
for directory in ALLDIRS:
    site.addsitedir(directory)

# Reorder sys.path so new directories at the front.
new_sys_path = []

for item in list(sys.path):
    if item not in prev_sys_path:
        new_sys_path.append(item)
        sys.path.remove(item)

sys.path[:0] = new_sys_path


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

import django.core.handlers.wsgi

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


My Apache config is this:

WSGIRestrictEmbedded On
WSGIPythonOptimize 1

<VirtualHost *:80>

  ServerName pootle.fasterminds.com

  DocumentRoot /var/www/pootle

  <Directory /var/www/pootle>
  WSGIProcessGroup pootle
  WSGIScriptReloading On
  Allow from all
  Order allow,deny
  </Directory>

  ErrorLog /var/log/apache2/pootle.fasterminds.com-error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.

  CustomLog /var/log/apache2/pootle.fasterminds.com-access.log combined

# --------------------------------------------------------------------------------------------

# point at the wsgi loader script
WSGIScriptAlias / /var/www/pootle/wsgi.py

# The following two optional lines enables "daemon mode" which limits the
# number of processes and therefore also keeps memory use more predictable
WSGIDaemonProcess pootle processes=2 threads=3 stack-size=1048576 maximum-requests=5000 inactivity-timeout=900 display-name=%{GROUP} python-path=/var/www/pootle/env/lib/python2.6/site-packages
WSGIProcessGroup pootle


Alias /assets /var/www/pootle/env/lib/python2.6/site-packages/pootle/assets <Directory "/var/www/pootle/env/lib/python2.6/site-packages/pootle/assets/">
        Order deny,allow
        Allow from all
    </Directory>

    Alias /export /var/lib/pootle
    <Directory "/var/lib/pootle>
        Order deny,allow
        Allow from all
    </Directory>


    <Location /export>
        SetOutputFilter DEFLATE
    </Location>

</VirtualHost>

Let me know if it helps.


With best regards,

Edwin Boersma

*Fasterminds*
/A Marketing Company./
www.fasterminds.com <http://www.fasterminds.com>

Phone: +46 (709) 726431 / +46 (520) 212989
Head Office: +46 (31) 3011801

Webpage: www.fasterminds.com <http://www.fasterminds.com>
Email: edwin.boer...@fasterminds.com <mailto:edwin.boer...@fasterminds.com>

This communication is intended for the person or entity to which it is addressed and may be confidential. Any review, re-transmission or dissemination is prohibited. If you received this transmission in error, please contact the sender then delete this message.

This email has been virus checked by the latest virus checking software, however, we advise you to carry out your own virus check as we cannot accept liability for any damage sustained as a result of any software viruses.





Op 03-06-13 23:21, Martin Bagge / brother schreef:
I am struggling with getting Apache to serve my Pootle instance. I have
followed most of the quick guide, thus the PATHs are standard.
Base system is a debian stable.

This is my apache error.log. It is fairly obvious what is wrong but I have
/no/ idea how to get it to find the missing module. It is in the file tree,
it's like it ignores the existance.


[Mon Jun 03 23:12:44 2013] [error] [client 94.254.67.55]
ImproperlyConfigured: Error importing middleware
pootle_misc.middleware.baseurl: "No module named
pootle_misc.middleware.baseurl"


The wsgi.py looks like this:
---------------------------------------------------------------------
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pootle.settings")

from django.core.wsgi import get_wsgi_application
w_application = get_wsgi_application()

def application(environ, start_response):
    os.environ['POOTLE_SETTINGS'] = '/home/pootle/config/pootle'
    return w_application(environ, start_response)
---------------------------------------------------------------------

and the apache config like this:
---------------------------------------------------------------------
<VirtualHost *:80>
         ServerAdmin brother+apache-poo...@bsnet.se
         ServerAlias drake.bthstudent.se

         WSGIScriptAlias /
/var/www/pootle/env/lib/python2.7/site-packages/pootle/wsgi.py

         WSGIDaemonProcess pootle processes=2 threads=3 stack-size=1048576
maximum-requests=5000 inactivity-timeout=900 display-name=%{GROUP}
python-path=/var/www/pootle/env/lib/python2.7/site-packages/
         WSGIProcessGroup pootle

         Alias /assets
/var/www/pootle/env/lib/python2.7/site-packages/pootle/assets
         <Directory
/var/www/pootle/env/lib/python2.7/site-packages/pootle/assets>
                 Order deny,allow
                 Allow from all
         </Directory>
</VirtualHost>
---------------------------------------------------------------------

root@drake:/var/www/pootle/env/lib/python2.7/site-packages/pootle# ls -l
apps/pootle_misc/baseurl.py*
-rw-r--r-- 1 root root 2216 Jun  3 20:45 apps/pootle_misc/baseurl.py
-rw-r--r-- 1 root root 2498 Jun  3 20:47 apps/pootle_misc/baseurl.pyc


any pointers. REALLY any pointer in any direction is of interest. I am
getting a smaller brain meltdown. And it looks like I am not alone.


(I was running a system wide setup earlier, this is not the same machine.
no worries there. completly new setup)

<<attachment: edwin_boersma.vcf>>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to