Tagged Questions
0
votes
1answer
28 views
Django caching issue
When I'm changing something in .py files, the changes are not shown immediately, but after few minutes (even half hour). I'm restarting, reloading apache, this don't help.
I'm using Apache2 with ...
0
votes
1answer
43 views
Is there a Python equivalent of PHP's $_GET[] and $_POST[]? [duplicate]
I'm using python and apache2.
I'd like to write a script called test.py that when accessed at http://example.com/test.py?foo=bar, prints the string 'bar'
I'm thinking it should be like this:
def ...
0
votes
0answers
28 views
Unlock encrypted partition securely with Python web page
I have a NAS with Linux as OS. I have encrypted a HDD partition with LUKS. I use cryptsetup luksOpen /dev/sda3 part3 to decrypt and mount the partition after boot. I enter the password when prompted.
...
0
votes
0answers
18 views
newsletter static files not served - because security of my page - how to do it
I am testing newsletter sending code in django. i am sending and getting newsletter well.
but since my beta page is secured with password and username, the static files like css and images are not ...
0
votes
0answers
54 views
Running a python cgi script on own webserver
I'm trying to run this simple file (from this tutorial)
/var/www/cgi-bin/textarea.py :
#!/usr/bin/python
# Import modules for CGI handling
import cgi, cgitb
# Create instance of FieldStorage
form ...
0
votes
2answers
24 views
Why does function not get executed when called through web server?
There is a python script:
#!/usr/bin/env python
import sys
import subprocess
subprocess.call("sudo /var/www/scripts/setPwm "+ sys.argv[1],shell=True)
print ("Content-type: ...
0
votes
1answer
140 views
Flask hello world using apache and mod_wsgi shows files in webroot only
I'm attempting to run the basic hello.py from the flask site over apache2 using wsgi. Here is what my code looks like:
/var/www/flask_dev/hello.py
from flask import Flask
app = Flask(__name__)
...
0
votes
2answers
47 views
How to disable directory browsing for a flask application hosted using apache mod_wsgi for CNAME access from a different domain
Something weird is happening with my flask application that I have hosted using apache mod_wsgi on Ubuntu. I have a virtualhost setup with my flask app imported to it. My virtualhost is present is ...
0
votes
0answers
53 views
Apache + Webpy returning “not found” message?
Here is the video tutorial i was following to set up my apache web server for web.py.
http://www.youtube.com/watch?v=831OahgMR9k
Here is my Vhost.conf
<VirtualHost *:80>
ServerAdmin ...
0
votes
1answer
28 views
How to re-use the same python application in phusion-passenger from different virtual hosts but maintaining separate processes?
I have 2 virtual hosts that serve the same django application using Apache and passenger, let's say:
<VirtualHost *:80>
ServerName A
SetEnv V "VA"
DocumentRoot /path/public
...
...
0
votes
3answers
321 views
Mod_wsgi/Django not responding to requests, Apache is serving static files just fine
Static files are getting served (example, http://iamshobhit.com/media/css/home.css)
But urls which mod_wsgi/django are supposed to take care of, just wait forever for response (example, ...
1
vote
1answer
100 views
Shutting down computer from a python script in apache
I have a headless Raspberry Pi which I want to have an easy means for my child to power down. I tried the following script in the apache web server:
import os
sss = os.popen('echo password | sudo -S ...
0
votes
1answer
49 views
Apache: How to set default document to a python script?
I have apache running on a Raspberry Pi. My website is using running Python scripts. How do I make, say, start.py, as the default document for the site? In other words, if the host name for the ...
0
votes
1answer
149 views
Django deployment with Apache on AWS — Directory Structure
I have a django app with the following structure
web/
manage.py
settings.py
wsgi.py
urls.py
/subapp1/
/subapp2/
When deployed on the development server runserver, everything links ...
0
votes
2answers
75 views
django apache setup troubles
I'm trying to deploy my new Django website onto an Apache2 server (running on a raspberry pi). Apache is running, and able to talk my app, but it isn't working properly; it's giving me a "Template ...
0
votes
1answer
53 views
Python Web Server - mod_wsgi
I have been looking at setting up a web server to use Python and I have installed Apache 2.2.22 on Debian 7 Wheezy with mod_wsgi. I have gotten the initial page up and going and the Apache will ...
0
votes
1answer
81 views
django production server - Django not sending mail in 500 error case to ADMINS
i have deployed django project finally on server and now it is working, but once i go to /admin/, i am getting 500 page but not notification.
this is what i have in settings_prod.py
from settings ...
0
votes
2answers
69 views
Which Webserver shall i take for High-Traffic Python Web-Pages? [closed]
We want to write our Webapps in Python for High-Traffic use (800 req/sec), but we don't know which Webserver and module are the best one.
We actually think Apache2 + mod_wsgi is a good option, but ...
0
votes
2answers
156 views
Import modules with mod_wsgi
I'm following a simple tutorial on Setting up mod_wsgi on WampServer all runs fine until I try to Import, I tried searching the net, but didn't get a working solution, is this a bug issues (maybe not) ...
0
votes
0answers
94 views
How to install & configure mod_wsgi for py3
I installed & configured mod_wsgi for python2.7 but now I would also like to have mod_wsgi for py3
I'm in ubuntu 12.04
My apache conf file looks like this for py2.7 :
<Directory ...
2
votes
0answers
118 views
bson ObjectId error instance error in Django/mongoengine
I'm getting the following error while doing some basic lookups (model.objects.filter()) in a mongoengine defined model (mongoengine.Document) inside Django.
id must be an instance of (str, unicode, ...
0
votes
1answer
125 views
How to configure apache2 for django wsgi?
i was trying to run my django application using apache2 and i failed. Its giving me a 500 internal server error saying
The server encountered an internal error or misconfiguration and was unable to ...
3
votes
1answer
44 views
Simple mod_rewrite example
I am trying to write a simple mod_rewrite rule, and I have no clue as to why it's not working.
I simply want to rewrite http://example.com/to/abc to http://example.com/to/index.py?to=abc.
Currently, ...
0
votes
0answers
63 views
What user does cgitb write to its logs as?
I'm using cgitb.enable() to trace errors. In my python script:
import cgitb
cgitb.enable(display=0,logdir="/var/log/apache2/python-err")
I then created the directory, set the owner and ...
0
votes
1answer
41 views
Is it possible to programatically control Apache httpd on Windows?
I would like to (preferably using Python) programmatically control Apache httpd on Windows. That is, stop and start the service, and ideally add/remove/stop/start individual sites.
I haven't found ...
0
votes
1answer
182 views
Python + Django run under a different user on apache2 (httpd), Redhat
i' ve a django application binded to httpd (apache2) on Red hat, and it works well however i' d like to run it under a different username than apache, so if it writes to the filesystem the file' s ...
0
votes
0answers
258 views
No module named os with WSGI
After upgrading python I found this error in logs:
[Mon Sep 02 22:19:27 2013] [error] File "/var/www/empirik/data/www/mysite.com/my_project/wsgi.py", line 16, in ?
[Mon Sep 02 22:19:27 2013] ...
3
votes
2answers
2k views
apache2 and mod wsgi : Target WSGI script cannot be loaded as Python module
I am trying to install mod_wsgi on apache2, on ubuntu.
So I install libapache2-mod-wsgi package, I activate him with a2enmod.
I got a web site (languageAnalyz), that I am trying to use with mod_wsgi.
...
0
votes
0answers
369 views
Can't run a Python CGI script on apache
I have a small problem and I can't solve it by my own. I'm really confused, because I read some tutorials. Please help me.
I have a fresh installed Apache2.2 on my Ubuntu 12.04. Now I want to run a ...
0
votes
2answers
300 views
Random 7 second delay from Apache on Django with mod_wsgi
I'm running into issues and have narrowed it down to Apache. I'm running Django w/Tastypie on mod_wsgi (worker mpm, daemon mode) on SSL. I'm calling the API through htaccess proxy on another server to ...
0
votes
1answer
49 views
Apache2 and .psp files
I have a server setup, and working. Trying to get add python scripting support. I seem to have it working, but how do I configure Apache2 to look for index.psp with out me needing to be specific. ...
3
votes
4answers
325 views
Howto configure Apache WSGI for multiple separate Django instances?
I have an apache instance where I have the following
WSGIPythonPath /production/somelocation/django12/lib/python2.4/site-packages/
<VirtualHost 192.168.1.1:443>
WSGIScriptAlias / ...
0
votes
2answers
124 views
How to check which Python interpreter is used to run WSGI scripts in apache2?
For example, there're two versions of django (1.1, 1.4) installed on the server, and two versions of python(2.6,2.7) as well. Is there a way to check which version of python/library is being used by ...
0
votes
1answer
181 views
Python, Configure mod_wsgi with Flask application on Windows 7
Okay I most be really bad at searching or a little slow. Anyways, after trying to setup mod_wsgi with my environment I have hit a wall.
I have tried the following tutorial. ...
0
votes
1answer
711 views
Django-cms with mod_wsgi
I've got following problem with mod_wsgi and Django-CMS.
Here is my httpd.conf fragment:
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
WSGIScriptAlias /cms ...
0
votes
1answer
185 views
running python scripts on apache PythonHandler configuration
I just installed python on ubuntu and configured the apache2 default conf with:
<Directory "/var/www/py">
AddHandler mod_python .py
PythonHandler hello
PythonDebug On
...
-1
votes
2answers
125 views
Trying to run a python django website but Mod_wsgi is not working
I am trying to run a pyhton django project using apache2 and mod_wsgi on linux.
It doesn't seem to be running any of the python code. When I enter the website's url (mysite.com on my server) in my ...
-1
votes
1answer
535 views
Getting Error when trying to setup mod_python [closed]
After installing mod_python and changing the /etc/apache2/sites-available/default file.I am getting following error when I try to run
tail -f /var/log/apache2/error.log
ai-System-Product-Name ...
1
vote
0answers
88 views
Django slowdown - thousands of unused datababase calls
I have a weird issue with a database consisting of about 27,000 items in the main table, and ~400,000 items in a many-to-many linking those items. The database is a Postgresql, running from Psycopg2, ...
1
vote
1answer
198 views
mod_wsgi loading python script from wrong Pyramid app directory
I have two apps with nearly identical code base (same functionality, just different branding) that I am trying to do virtual hosting with using mod_wsgi and apache.
the virtual host settings for both ...
0
votes
1answer
334 views
Internal Server Error when retrieving JSON from a python script using JQuery
I'm trying to write a simple web application that uses JQuery to call a python script. The python script returns data in JSON format. Here is the ajax call in my Javascript:
console.log('before');
...
1
vote
1answer
58 views
Python mod_wsgi application strange behavior
I am relatively new to Python and Python web application development. Currently I am creating a hello world application in Python using mod_wsgi
Here are my configurations.
Apache configuration
...
0
votes
1answer
73 views
how to write a wsgi wrapper for php applications?
Is it possible to write a wsgi (werkzeug) application, that returns the output of a php application?
In detail, i have the following problem:
We have a couple of old, legacy php applications and need ...
1
vote
1answer
159 views
(Another) ImportError with Flask under mod_wsgi
Sorry if this seems like a repeat of several previous questions, but none of those have helped me so far :-/
I have written a Flask app that I am attempting to deploy under mod_wsgi and apache2.
I ...
0
votes
1answer
35 views
Apache2 Ruby and Python load default website when *.domain.net is set in vhost file
5 sites setup using named vhosts.
site1.domain.net (PHP)
site2.domain.net (Python)
site3.domain.net (Ruby)
site4.domain.net (PHP)
site5.domain.net (PHP)
In the vhost for site1 I also have the ...
0
votes
0answers
122 views
Error with subprocess in python and apache as well as requests
I am trying to develop a website with django, and I had everything running fairly well under my development environment but now that I am trying to deploy it to an apache based server I am running ...
0
votes
0answers
113 views
Apache with mod_wsgi and python returns 500 periodically
I have a website running on Python and Flask. 4 times out of 10 it returns a 500 error, randomly as far as I can tell.
from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
...
0
votes
2answers
492 views
Import python from wsgi fails
I've got a folder structure on an apache2/flask server that is this:
/var/www/myapp
/var/www/myapp/routing.py
/var/www/myapp/__init__.py
/var/www/wsgi-scripts/myapp.wsgi
My application file ...
1
vote
0answers
224 views
Django Response always Chunked with text/html cannot set Content-Length
In my Django Application's views.py , I return an HttpResponse object after attempting to set the following HTTP Header fields:
# Create a Response Object with the content to return
response = ...
0
votes
1answer
155 views
Caching Django Responses with mod_wsgi and Apache2 mem_cache
I've followed the following article in an attempt to setup Apache2 caching in order to use it with Django on Ubuntu 12.10 with mod_wsgi. I want Apache to cache some requests for me.
...