Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to set up web.py under mod_fcgid (and Apache, on CentOS 6). If I follow the instructions at http://webpy.org/cookbook/fastcgi-apache, it just works.

But, I want to go a step further, and have this run under suexec. To make that one step more complicated, my DocumentRoot is under /srv/, and of course suexec is hard-coded to require scripts to be under /var/www.

I have this working with PHP, with the following configuration:

<VirtualHost *:80>
  ServerName mysite.example.org
  DocumentRoot /srv/mysite

  SuexecUserGroup safeuser safegroup

  AddType application/x-httpd-php .php

  <Directory "/srv/mysite/">
    DirectoryIndex index.php
    AllowOverride Options
    AddHandler fcgid-script .php
    FCGIWrapper /var/www/fcgi/mysite/php-fcgi .php
    Options ExecCGI FollowSymLinks
  </Directory>
</VirtualHost>

where /var/www/fcgi/mysite/php-fcgi is

#!/bin/bash
export PHP_FCGI_CHILDREN=0
export PHP_FCGI_MAX_REQUESTS=4000
exec /usr/bin/php-cgi $@

And that works beautifully. But, I can't seem to translate the requirements for web.py to work with FCGIWrapper.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.