Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

mod_fcgid-2.1-r1, suexec, php and apache-2.2

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
kaktuspalme
n00b
n00b
Posts: 29
Joined: Sun Apr 23, 2006 8:12 pm

mod_fcgid-2.1-r1, suexec, php and apache-2.2

  • Quote

Post by kaktuspalme » Fri Jun 01, 2007 9:58 pm

Hi, im searching and searching and searching... :D
I didn't find anything how to configure mod_fcgid with apache 2.2 and php and suexec, can anyone help me? Or can anyone post a sample config with the actual mod_fcgid-2.1-r1? I would like to make a tutorial if it works.
At the moment mod_fcgid with apache 2.2 and php works, but without a php.ini per vhost.


Sorry for this bad post, but on my systems its 12 o' clock at the moment :)
Sorry for my bad Englisch.
Top
nativemad
Retired Dev
Retired Dev
User avatar
Posts: 918
Joined: Mon Aug 30, 2004 5:23 pm
Location: Switzerland

  • Quote

Post by nativemad » Sat Jun 09, 2007 10:11 am

Ok, assuming you have www.vhost.com, your user is called vhostuser and is in the Group web-group. The Doc-root starts at /var/www/www.vhost.com/root/public_html/ in this sample.
This goes additionaly in the vhost apache conf:

Code: Select all

DocumentRoot /var/www/www.vhost.com/root/public_html
SuexecUserGroup vhost-user web-group

<Directory "/var/www/www.vhost.com/root/public_html/>
AddHandler fcgid-script .php
Options ExecCGI FollowSymLinks
allow from all
FCGIWrapper /var/www/www.vhost.com/cgi-bin/php .php
</Directory>
This is in /var/www/ww.vhost.com/cgi-bin/php:

Code: Select all

#!/bin/sh
PHPRC="/var/www/www.vhost.com/"
export PHPRC
PHP_FCGI_CHILDREN=8
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php5-cgi  #Here you can also switch to php4
The php.ini can be placed at /var/www/www.vhost.com/php.ini
and /etc/apache2/modules.d/20_mod_fcgid.conf looks like this:

Code: Select all

<IfDefine FCGID>
    <IfModule !mod_fcgid.c>
        LoadModule fcgid_module modules/mod_fcgid.so
    </IfModule>
    <IfModule mod_fcgid.c>
        AddHandler fcgid-script .fcg
IdleTimeout 1200
  ProcessLifeTime 3600
  IPCConnectTimeout 1200
    IPCCommTimeout 900
    </IfModule>
</IfDefine>
Hopefully this gives you an idea of how it can be done... :wink:
Top
kaktuspalme
n00b
n00b
Posts: 29
Joined: Sun Apr 23, 2006 8:12 pm

  • Quote

Post by kaktuspalme » Wed Jun 13, 2007 10:02 am

Really Really thanks, i will try it today and post if its work.
Top
nativemad
Retired Dev
Retired Dev
User avatar
Posts: 918
Joined: Mon Aug 30, 2004 5:23 pm
Location: Switzerland

  • Quote

Post by nativemad » Wed Jul 04, 2007 2:55 pm

did it work for you? Or can i help further?
Top
Post Reply

4 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic