Skip to content

Instantly share code, notes, and snippets.

@qingfeng
Created September 16, 2008 11:25
Show Gist options
  • Save qingfeng/11017 to your computer and use it in GitHub Desktop.
Save qingfeng/11017 to your computer and use it in GitHub Desktop.
django server conf files
LoadModule python_module libexec/apache22/mod_python.so
<Directory "/usr/local/SysMonitor/NMSWeb/">
AllowOverride AuthConfig
Order allow,deny
Satisfy All
</Directory>
<Location "/">
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/png "now"
ExpiresDefault "now"
</IfModule>
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE NMSWeb.settings
PythonPath "['/usr/local/SysMonitor']+sys.path"
PythonDebug On
</Location>
user nobody;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
charset utf-8;
sendfile on;
tcp_nopush on;
keepalive_timeout 75 20;
server {
#listen 9000;
listen 80;
server_name localhost;
location / {
fastcgi_pass 127.0.0.1:8000;
fastcgi_param PATH_INFO $fastcgi_script_name;
#fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
include fastcgi_params;
}
}
}
/usr/local/bin/python manage.py runfcgi host=127.0.0.1 port=8000 method=threaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment