project files are downloadable in browser, something wrong in httpd.conf. help please :(

12 views
Skip to first unread message

Doniyor Jurabaev

unread,
May 12, 2012, 1:56:48 AM5/12/12
to mod...@googlegroups.com
hey guys, i was configuring my django project on server, in httpd.conf file. suddenly i have 500 Internal Server Error. before that i had the page where files can be just downloaded. how can i fix this? apache2.2 is running and mod_wsgi is installed. i think, i dont know how to tell apache about my mod_wsgi and djangoproject. What i now have is: 

a folder 'apache' next to my django project folder. Apache folder has: apache_django_wsgi.conf, myproject.wsgi, __init__.py, urls_production.py, settings_production.py

and in httpd.conf i have this (stahlhandel is my djangoproject): 

<VirtualHost 85.114.145.142:80>
    RewriteEngine On
    RewriteLog          /usr/local/httpd/logs/rewrite.log
    RewriteLogLevel     2
    RewriteMap          low     int:tolower
    RewriteMap          subdom  txt:/usr/local/httpd/conf/subdomains.lst
    RewriteCond         ${subdom:%{HTTP_HOST}}  ^(/.*)$
    RewriteRule         ^/(.*)$   %1/$1 [E=SUBDOM:${low:%{HTTP_HOST}}]
    DocumentRoot /usr/local/httpd/htdocs/admin
    Servername admin.afect.stahlbaron.de
</VirtualHost>

<VirtualHost 85.114.145.142:80>
    ServerAdmin webmaster
    Servername afect.stahlbaron.de
    Serveralias www.afect.stahlbaron.de
    DocumentRoot /usr/local/httpd/vhtdocs/stahlbaron/stahlhandel
    SuexecUserGroup stahlbaron stahlbaron
    ScriptAlias /cgi-bin/ /usr/local/httpd/vhtdocs/stahlbaron/cgi-bin/
    WSGIScriptAlias / /www/vhtdocs/stahlbaron/stahlhandel/apache/lastsite.wsgi
<Directory />
    Options SymLinksIfOwnerMatch Indexes
    AllowOverride AuthConfig
    Allow from all
</Directory>

<Directory /usr/local/httpd/vhtdocs/stahlbaron/stahlhandel/apache/>
Order deny,allow
Allow from all
</Directory>

  ScriptAlias /php/ /usr/local/httpd/conf/php/stahlbaron.de/
  AddHandler php-cgi .php
  Action php-cgi /php/php.cgi
# DocumentRoot /usr/local/httpd/htdocs/
   # Servername afect.stahlbaron.de
</VirtualHost>

can it be that i am missing <Location /> tag or is it here not relevant? 

thanks
Reply all
Reply to author
Forward
0 new messages