mod-wsgi

Django + Apache + mod_wsgi permission denied

陌路散爱 提交于 2019-12-14 03:39:28
问题 I finished the tutorial on Django's site about using mod_wsgi (here), and having substituted my paths as appropriate, results in a big fat "Permission denied." when I try to access /. Here is the stuff I added to httpd.conf ( mod_wsgi is enabled earlier in the conf file): # Django configuration WSGIScriptAlias / /usr/local/django/billing/apache/django.wsgi <Directory /usr/local/django/billing/apache/django.wsgi> Order allow,deny Allow from all </Directory> AliasMatch ^/([^/]*\.css) /usr/local

How can I stop sys.stdout logging to apache error file?

孤街醉人 提交于 2019-12-14 02:50:05
问题 I have the Python logging library set up to log everything to my console handler. This works great in development so I can see my log messages without having to look through the files but in production all of the logs are being written to the apache error file. Is this desired behaviour? Shouldn't stderr solely write to the error file? The console handler set up in my yaml config file: handlers: console: class: logging.StreamHandler formatter: precise filters: [request_id] stream: ext://sys

Why doesn't mod_wsgi support daemon mode on Windows?

百般思念 提交于 2019-12-14 01:06:52
问题 On http://code.google.com/p/modwsgi/ one can read this statement Daemon mode of mod_wsgi will however only be available on Apache 2.0 or 2.2 running on UNIX, and only when the Apache runtime library underlying Apache has been compiled with support for threading. What's the reason there's no support for daemon mode under Windows? I found the above after getting Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration error from

Error while uploading Django project to a Apache server via mod_wsgi

天涯浪子 提交于 2019-12-13 19:13:06
问题 I created a droplet(cloud server) on DigitalOcean and with no-ip.com I gave it the hostname - project.ddns.net.By ssh(ing) into the droplet I installed pip and virtualenv. Inside /var/www/ I created a virtualenv and cloned the repository from github of my project.The directory struture is - project_revamped (root of the project) ->requirements ->base.txt ->dev.txt ->project (django project) ->static ->media ->apps (folder which contains apps) ->manage.py ->project ->urls.py ->settings ->base

403 error on Apache Server with Django application

倖福魔咒の 提交于 2019-12-13 18:25:23
问题 I've been searching throughout this site for a solution but haven't been able to find one. I have a CentOS 6.4 server with Apache 2.2.15, Django 1.6 and mod_wsgi 3.2. I am using Apache to display static files and mod_wsgi to display Django content. I placed the Django project files in the /srv directory due to this page. When I run the Django development server, the test page that I wrote up displays properly. However, when I start my Apache server and visit 127.0.0.1, I get a 403 Forbidden

How to use uuid lib with mod_wsgi?

空扰寡人 提交于 2019-12-13 15:25:39
问题 This is the traceback: mod_wsgi: Target WSGI script '/[..]/project/wsgi.py' cannot be loaded as Python module. mod_wsgi: Exception occurred processing WSGI script '/[..]/project/wsgi.py'. Traceback (most recent call last): File "/home/ubuntu/api/api/wsgi.py", line 11, in <module> import uuid as uuid File "/home/ubuntu/.virtualenvs/api/lib/python3.4/site-packages/uuid.py", line 138 if not 0 <= time_low < 1<<32L: ^ SyntaxError: invalid syntax Not sure where the problem lies... has the uuid.py

Issues getting Python 2.7 to work with my django project

与世无争的帅哥 提交于 2019-12-13 08:09:32
问题 For a while now I have been trying to get my django project install of badgr (badgr-server on github) working with mod_wsgi. I am pretty way in over my head but I do believe I have made some progress. Here is the error message I am currently getting: [Thu Nov 17 12:48:48.182772 2016] [core:notice] [pid 24556] AH00094: Command line: '/opt/rh/httpd24/root/usr/sbin/httpd' [Thu Nov 17 12:48:50.421089 2016] [:error] [pid 24558] [remote 140.225.0.153:60440] mod_wsgi (pid=24558): Target WSGI script

embedded mode of mod_wsgi with virtualenv

偶尔善良 提交于 2019-12-13 07:30:01
问题 conclusion of this question 1.what I wanted to do in the first place. i wanted to allow only some user in Django can upload file. I could do write codes to do that in Django web framework. But if you set upload folder as r__ permssions, you can't upload file in the first place. I just set my upload folder as drwxrwxrwx 777 permssions to let my users in Django can upload files. leaving your folder as 777 permssion seems bad idea for security reason clearly. I wanted to set my media folder as

Django app stops working when deployed on Apache ( subprocess runs, but fails )

核能气质少年 提交于 2019-12-13 06:42:14
问题 My Django app stops working when deployed on Apache ( with mod_wsgi ). It runs on a Windows server. The app calls on a windows executable called "rex" ( Alchemy Remote Executor ) which executes a command on another remote windows box. process = subprocess.Popen( ['rex',ip,usr,pwd,command], stdout=subprocess.PIPE, universal_newlines=True ) out, err = process.communicate() This all works fine in development, but when deployed on Apache with mod_wsgi, it doesn't work! The "rex" program still

WSGI post-process cleanup

放肆的年华 提交于 2019-12-13 05:59:19
问题 I'm running a TurboGears app with mod_wsgi and apache, using pymongo wrapped with Ming for persistence. To failproof and scale my app I was interested in using mongo's support for replica sets through a pymongo ReplicaSetConnection. However, as specified in the above links, one must call close() when done with every pymongo ReplicaSetConnection object, otherwise it will leave a bunch of zombie processes floating around (wtf pymongo). This sort of behavior isn't supported very well in Ming (it