Ask Your Question
2

Are there any tricks for Askbot w/FCGI?

asked 2011-09-25 19:38:08 -0600

nicafyl gravatar image

I am trying to get Askbot running on a2hosting with FCGI. (I picked them because they have Postgres available.) Running the FCGI script directly with the Python interpreter seems to work (one warning "/home/qanetcom/Python/lib/python2.7/site-packages/coffin/common.py:59: UserWarning: Cannot translate loader: askbot.skins.loaders.loadtemplatesource warnings.warn('Cannot translate loader: %s' % loader" but returns a status 302) but a 404 when trying to invoke it from a browser. Nothing in the log. Note that I am using my own copy of Python (2.7.2).

Maybe the "big trick" is how to track down the problem with no log entries, error messages, ...

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-10-01 20:05:22 -0600

nicafyl gravatar image

updated 2011-10-01 20:06:45 -0600

Finally, I have an answer. Bottom line is that fcgi was broken on a2hosting.com. They have fixed it on at least their server a2s65. If it does now work for you I suggest putting up the standard Python test script there (you can find it in http://docs.python.org/howto/webservers.html) with a .htaccess file like this:

SetHandler fcgid-script

Options +ExecCGI

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ scriptname.fcgi/$1 [QSA,L]

where "scriptname" is the name you used for the test script. If it does not work, bitch at them that their web server is improperly configured.

edit flag offensive delete link more

Comments

Great! Could you explain what you mean by coming up with a test for this?

Evgeny gravatar imageEvgeny ( 2011-10-02 14:04:18 -0600 )edit
0

answered 2011-09-25 19:54:22 -0600

Evgeny gravatar image

updated 2011-09-25 19:56:01 -0600

Those warnings should be ignored, hopefully we'll find the time to silence them, but in production you could try switching logging level to logging.CRITICAL and periodically truncate or rotate the log file.

You are mentioning error 404 - what is the url for which you are getting that error?

edit flag offensive delete link more

Comments

/askbot.fcgi/ with or without anything (such as questions) following it. But, just asking that question pointed me at where I should be looking. I have been staring at the fcgi script and it is clearly not the problem. That should help.

nicafyl gravatar imagenicafyl ( 2011-09-26 06:56:46 -0600 )edit

@nicafyl, you can use shift+ENTER co create multiline comments, but it may be that you have urls.py file incorrect. The templates for the project files are in the directory askbot/setup_templates/ in the case you are tweaking the settings.py and urls.py manually.

Evgeny gravatar imageEvgeny ( 2011-09-26 07:02:46 -0600 )edit

It appears it is not an Askbot issue but something with fcgi. I just put a dummy fcgi script out there and have the same problem. My .htaccess file is as they suggest but isn't happy. I will post the solution once I figure it out. Thanks.

nicafyl gravatar imagenicafyl ( 2011-09-26 07:50:23 -0600 )edit

While I don't have a final answer, the intermediate one is that fcgi does not work there. I set up a test program and it fails. Did the same on a local system and it works. So, I am still waiting for them to fix fcgi.

nicafyl gravatar imagenicafyl ( 2011-09-30 17:01:21 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-09-25 19:38:08 -0600

Seen: 229 times

Last updated: Oct 01 '11