First time here? Check out the FAQ!
1

500 Internal Server Error when I tried installing Askbot with Apache

Hello,

I am trying to make Askbot to work with Apache and I had followed the instructions that were given in this document. I had copied the httpd.conf straight from the doc with some modifications of my own to fit to my localhost machine. I am new to the linux world, and to apache and askbot as well. I am getting a 500 Internal Server Error, and both the apache error logs and askbot logs dont show anything suspicious. The askbot's error.log just has these lines for my browser request:

  [Wed May 11 23:43:11 2011] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 608 to 368 : URL /
  [Wed May 11 23:43:24 2011] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 608 to 368 : URL /qasite

I think I might be missing something very basic here, please let me know. I would really appreciate that. I have no idea where to look at now.

My httpd.conf looks as follows:

WSGISocketPrefix /home/ibm/qasite/socket
WSGIPythonEggs /var/python/eggs
WSGIPythonHome /usr/local

<VirtualHost 127.0.0.1:80>

 ServerAdmin you@localhost
 DocumentRoot /home/ibm/qasite
 ServerName localhost

 #aliases to serve static media directly
 #will probably need adjustment
 Alias /m/ /usr/local/lib/python2.6/dist-packages/askbot/skins/default/media/
 Alias /upfiles/ /home/ibm/qasite/askbot/upfiles/
 Alias /admin/media/ /usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/contrib/admin/media
 <DirectoryMatch "/home/ibm/qasite/askbot/skins/([^/]+)/media">
    Order deny,allow
    Allow from all
 </DirectoryMatch>
 <Directory "/home/ibm/qasite/askbot/upfiles">
    Order deny,allow
    Allow from all
 </Directory>
 #must be a distinct name within your apache configuration
 WSGIDaemonProcess askbot2
 WSGIProcessGroup askbot2
 WSGIScriptAlias / /home/ibm/qasite/django.wsgi
 #make all admin stuff except media go through secure connection
 <LocationMatch "/admin(?!/media)">
 RewriteEngine on
     RewriteRule /admin(.*)$ https://localhost/admin$1 [L,R=301]
     </LocationMatch>
 CustomLog /var/log/httpd/askbot/access_log common
 ErrorLog /var/log/httpd/askbot/error_log
 LogLevel debug
</VirtualHost>

 #again, replace the IP address
 <VirtualHost 127.0.0.1:443>

 ServerAdmin you@localhost
 DocumentRoot /home/ibm/qasite
 ServerName localhost
 <LocationMatch "^(?!/admin)">
     RewriteEngine on
     RewriteRule django.wsgi(.*)$ http://localhost$1 [L,R=301]
 </LocationMatch>
 SSLEngine on
 #your SSL keys
 SSLCertificateFile /etc/httpd/ssl.crt/server.crt
 SSLCertificateKeyFile /etc/httpd/ssl.key/server.key
 Alias /admin/media/ /usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/contrib/admin/media
 WSGIScriptAlias / /home/ibm/qasite/django.wsgi
 CustomLog /var/log/httpd/askbot/access_log common
 ErrorLog /var/log/httpd/askbot/error_log
 </VirtualHost>
dineshka's avatar
11
dineshka
asked 2011-05-11 13:30:39 -0600
edit flag offensive 0 remove flag close merge delete

Comments

Does askbot work with "runserver"? on the command line: "python manage.py runserver `hostname -i`:8000"
Evgeny's avatar Evgeny (2011-05-11 14:06:19 -0600) edit
add a comment see more comments

1 Answer

0

It is possible that some of your directories are not writable by the webserver, log directories may not exist, the unix socket for mod_wsgi not accessible...

In the same directory where you have settings.py directory log and askbot/upfiles must be writable by the apache process.

Also it could be some other error, perhaps you could take a look at apache's default error log as well and maybe system messages: /var/log/messages

Usually there is an error logged somewhere, unless your logging level is set to ignore writing messages.

Evgeny's avatar
13.2k
Evgeny
answered 2011-05-11 14:24:15 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments