Ask Your Question
1

500 Internal Server Error when I tried installing Askbot with Apache

asked 2011-05-11 13:30:39 -0500

dineshka gravatar image

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>
edit retag flag offensive close merge delete

Comments

Does askbot work with "runserver"? on the command line: "python manage.py runserver `hostname -i`:8000"
Evgeny gravatar imageEvgeny ( 2011-05-11 14:06:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-05-11 14:24:15 -0500

Evgeny gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-05-11 13:30:39 -0500

Seen: 805 times

Last updated: May 11 '11