RE: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid)
I am under the impression that suPHP is the better/more secure way of running PHP with Apache. In addition you don't need suEXEC to do so. Am I incorrect in these assumptions? What are the benefits of running PHP as a CGI(if you don't mind me asking) ? Mark -Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Grant Peel Sent: Wednesday, 29 June 2011 2:13 PM To: freebsd-questions@freebsd.org Subject: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid) Hello Everyone, I am researching how to run PHP as CGI with Apache's Suexec module. Up to this point we have been using PHP as an Apache mod, but are looking to move to the more secure solution. I am not sure this is exactly the right list top post to so if anyone knows a better one please let me know :-) I am using FreeBSD (8) as the OS, Apache 2.2, PHP5 with several extensions installed. What I am looking for is to have PHP run as a CGI wrapped with suexec, and to have the fastcgi module, or, mod_fcgid. I have never set this up before so if anyone knows of a usefull 'how-to' that would be great. I have been reading through http://www.cyberciti.biz/faq/freebsd-apache22-fastcgi-php-configuration/ and it seems to have some good hints. Of course, once we get this all figured out, I will post a complete step by set here. TIA, -Grant ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org *** Travelex - www.travelex.com Travelex Outsourcing Pty Limited [Currency Select businesss] is a limited company registered in Australia with company number: 127 747 586. Information in this email including any attachment ('email') is confidential, may be privileged and is intended solely for the addressee. Unauthorised recipients are requested to preserve the confidentiality of this email, advise the sender immediately of any error in transmission, and then delete the email from the recipient's mailbox without making copies. Any disclosure, copying, distribution or action taken, or omitted to be taken, in reliance upon the contents of this email by unauthorised recipients is prohibited and may be unlawful. Please note that no contracts or commitments may be concluded on behalf of Travelex Outsourcing Pty Limited [Currency Select businesss] or its groups of companies ('Travelex') by means of email, and no statement or representation made in this email is binding on behalf of Travelex. DISCLAIMER: Whilst this message has been scanned for viruses, Travelex disclaims any responsibility or liability for viruses contained therein. It is therefore recommended that all emails should be scanned for viruses. *** ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid)
*fast* cgi , which as the name implies, is erm, fast ;) See, only apache has PHP as a module. Other web servers such as nginx or lighttpd use a fastcgi process. This has several advantages: - you'll no longer see apache exit with (quote) a signal 11, core dumped because of lousy php code / errors. - you can use different php config files for different vhosts - php fcgi is faster - you can use process accounting to check the processing time consumed individually by your web server , and your PHP processes - you will slightly reduce the size of your apache processes, since they'll no longer load mod_php On 6/29/11 8:31 AM, Van Der Meulen, Mark wrote: I am under the impression that suPHP is the better/more secure way of running PHP with Apache. In addition you don't need suEXEC to do so. Am I incorrect in these assumptions? What are the benefits of running PHP as a CGI(if you don't mind me asking) ? Mark -Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Grant Peel Sent: Wednesday, 29 June 2011 2:13 PM To: freebsd-questions@freebsd.org Subject: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid) Hello Everyone, I am researching how to run PHP as CGI with Apache's Suexec module. Up to this point we have been using PHP as an Apache mod, but are looking to move to the more secure solution. I am not sure this is exactly the right list top post to so if anyone knows a better one please let me know :-) I am using FreeBSD (8) as the OS, Apache 2.2, PHP5 with several extensions installed. What I am looking for is to have PHP run as a CGI wrapped with suexec, and to have the fastcgi module, or, mod_fcgid. I have never set this up before so if anyone knows of a usefull 'how-to' that would be great. I have been reading through http://www.cyberciti.biz/faq/freebsd-apache22-fastcgi-php-configuration/ and it seems to have some good hints. Of course, once we get this all figured out, I will post a complete step by set here. TIA, -Grant ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org *** Travelex - www.travelex.com Travelex Outsourcing Pty Limited [Currency Select businesss] is a limited company registered in Australia with company number: 127 747 586. Information in this email including any attachment ('email') is confidential, may be privileged and is intended solely for the addressee. Unauthorised recipients are requested to preserve the confidentiality of this email, advise the sender immediately of any error in transmission, and then delete the email from the recipient's mailbox without making copies. Any disclosure, copying, distribution or action taken, or omitted to be taken, in reliance upon the contents of this email by unauthorised recipients is prohibited and may be unlawful. Please note that no contracts or commitments may be concluded on behalf of Travelex Outsourcing Pty Limited [Currency Select businesss] or its groups of companies ('Travelex') by means of email, and no statement or representation made in this email is binding on behalf of Travelex. DISCLAIMER: Whilst this message has been scanned for viruses, Travelex disclaims any responsibility or liability for viruses contained therein. It is therefore recommended that all emails should be scanned for viruses. *** ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid)
Should I be using suPHP then instead of the formentioned suexec/mod_fcgid ? -Grant -Original Message- From: Damien Fleuriot Sent: Wednesday, June 29, 2011 4:25 AM To: freebsd-questions@freebsd.org Subject: Re: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid) *fast* cgi , which as the name implies, is erm, fast ;) See, only apache has PHP as a module. Other web servers such as nginx or lighttpd use a fastcgi process. This has several advantages: - you'll no longer see apache exit with (quote) a signal 11, core dumped because of lousy php code / errors. - you can use different php config files for different vhosts - php fcgi is faster - you can use process accounting to check the processing time consumed individually by your web server , and your PHP processes - you will slightly reduce the size of your apache processes, since they'll no longer load mod_php On 6/29/11 8:31 AM, Van Der Meulen, Mark wrote: I am under the impression that suPHP is the better/more secure way of running PHP with Apache. In addition you don't need suEXEC to do so. Am I incorrect in these assumptions? What are the benefits of running PHP as a CGI(if you don't mind me asking) ? Mark -Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Grant Peel Sent: Wednesday, 29 June 2011 2:13 PM To: freebsd-questions@freebsd.org Subject: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid) Hello Everyone, I am researching how to run PHP as CGI with Apache's Suexec module. Up to this point we have been using PHP as an Apache mod, but are looking to move to the more secure solution. I am not sure this is exactly the right list top post to so if anyone knows a better one please let me know :-) I am using FreeBSD (8) as the OS, Apache 2.2, PHP5 with several extensions installed. What I am looking for is to have PHP run as a CGI wrapped with suexec, and to have the fastcgi module, or, mod_fcgid. I have never set this up before so if anyone knows of a usefull 'how-to' that would be great. I have been reading through http://www.cyberciti.biz/faq/freebsd-apache22-fastcgi-php-configuration/ and it seems to have some good hints. Of course, once we get this all figured out, I will post a complete step by set here. TIA, -Grant ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org *** Travelex - www.travelex.com Travelex Outsourcing Pty Limited [Currency Select businesss] is a limited company registered in Australia with company number: 127 747 586. Information in this email including any attachment ('email') is confidential, may be privileged and is intended solely for the addressee. Unauthorised recipients are requested to preserve the confidentiality of this email, advise the sender immediately of any error in transmission, and then delete the email from the recipient's mailbox without making copies. Any disclosure, copying, distribution or action taken, or omitted to be taken, in reliance upon the contents of this email by unauthorised recipients is prohibited and may be unlawful. Please note that no contracts or commitments may be concluded on behalf of Travelex Outsourcing Pty Limited [Currency Select businesss] or its groups of companies ('Travelex') by means of email, and no statement or representation made in this email is binding on behalf of Travelex. DISCLAIMER: Whilst this message has been scanned for viruses, Travelex disclaims any responsibility or liability for viruses contained therein. It is therefore recommended that all emails should be scanned for viruses. *** ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid)
I would guess so, however I have no experience with fcgi on apache, I only run it with nginx and lighttpd servers. On 6/29/11 6:04 PM, Grant Peel wrote: Should I be using suPHP then instead of the formentioned suexec/mod_fcgid ? -Grant -Original Message- From: Damien Fleuriot Sent: Wednesday, June 29, 2011 4:25 AM To: freebsd-questions@freebsd.org Subject: Re: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid) *fast* cgi , which as the name implies, is erm, fast ;) See, only apache has PHP as a module. Other web servers such as nginx or lighttpd use a fastcgi process. This has several advantages: - you'll no longer see apache exit with (quote) a signal 11, core dumped because of lousy php code / errors. - you can use different php config files for different vhosts - php fcgi is faster - you can use process accounting to check the processing time consumed individually by your web server , and your PHP processes - you will slightly reduce the size of your apache processes, since they'll no longer load mod_php On 6/29/11 8:31 AM, Van Der Meulen, Mark wrote: I am under the impression that suPHP is the better/more secure way of running PHP with Apache. In addition you don't need suEXEC to do so. Am I incorrect in these assumptions? What are the benefits of running PHP as a CGI(if you don't mind me asking) ? Mark -Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Grant Peel Sent: Wednesday, 29 June 2011 2:13 PM To: freebsd-questions@freebsd.org Subject: Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid) Hello Everyone, I am researching how to run PHP as CGI with Apache's Suexec module. Up to this point we have been using PHP as an Apache mod, but are looking to move to the more secure solution. I am not sure this is exactly the right list top post to so if anyone knows a better one please let me know :-) I am using FreeBSD (8) as the OS, Apache 2.2, PHP5 with several extensions installed. What I am looking for is to have PHP run as a CGI wrapped with suexec, and to have the fastcgi module, or, mod_fcgid. I have never set this up before so if anyone knows of a usefull 'how-to' that would be great. I have been reading through http://www.cyberciti.biz/faq/freebsd-apache22-fastcgi-php-configuration/ and it seems to have some good hints. Of course, once we get this all figured out, I will post a complete step by set here. TIA, -Grant ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org *** Travelex - www.travelex.com Travelex Outsourcing Pty Limited [Currency Select businesss] is a limited company registered in Australia with company number: 127 747 586. Information in this email including any attachment ('email') is confidential, may be privileged and is intended solely for the addressee. Unauthorised recipients are requested to preserve the confidentiality of this email, advise the sender immediately of any error in transmission, and then delete the email from the recipient's mailbox without making copies. Any disclosure, copying, distribution or action taken, or omitted to be taken, in reliance upon the contents of this email by unauthorised recipients is prohibited and may be unlawful. Please note that no contracts or commitments may be concluded on behalf of Travelex Outsourcing Pty Limited [Currency Select businesss] or its groups of companies ('Travelex') by means of email, and no statement or representation made in this email is binding on behalf of Travelex. DISCLAIMER: Whilst this message has been scanned for viruses, Travelex disclaims any responsibility or liability for viruses contained therein. It is therefore recommended that all emails should be scanned for viruses. *** ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Apache 2.2 + PHP5 + SuExec + (fast-cgi or mod_fcgid)
Hello Everyone, I am researching how to run PHP as CGI with Apache's Suexec module. Up to this point we have been using PHP as an Apache mod, but are looking to move to the more secure solution. I am not sure this is exactly the right list top post to so if anyone knows a better one please let me know :-) I am using FreeBSD (8) as the OS, Apache 2.2, PHP5 with several extensions installed. What I am looking for is to have PHP run as a CGI wrapped with suexec, and to have the fastcgi module, or, mod_fcgid. I have never set this up before so if anyone knows of a usefull 'how-to' that would be great. I have been reading through http://www.cyberciti.biz/faq/freebsd-apache22-fastcgi-php-configuration/ and it seems to have some good hints. Of course, once we get this all figured out, I will post a complete step by set here. TIA, -Grant ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Nginx PHP5 Fast-CGI FreeBSD CURRENT
Ok wizards Nginx Lighttpd Fast-cgi and PHP5 seems all configured, yet when i point a browser at a php page it tries to download the file, instead of render it in the browser, any ideas what i missed --nginx.conf-- #user nobody; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfileon; keepalive_timeout 65; server { listen 80; server_name localhost; location / { root /usr/local/www/nginx; index index.html index.php index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/local/www/nginx-dist; } # .php5 sent to php5 location ~ .*\.php5$ { include /usr/local/etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:10005; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /$fastcgi_script_name; } } and /usr/local/sbin/spawn-fcgi -f /usr/local/bin/php-cgi -a 127.0.0.1 -p 9000 -u www ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Nginx PHP5 Fast-CGI FreeBSD CURRENT
Le Sun, 09 Sep 2007 01:38:50 +0300, OutBackDingo [EMAIL PROTECTED] a écrit : # .php5 sent to php5 location ~ .*\.php5$ { I'm not sure for this expression, i use for .php location ~ \.php$ { include /usr/local/etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:10005; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /$fastcgi_script_name; You should append the root location of the server: fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx$fastcgi_script_name; /usr/local/sbin/spawn-fcgi -f /usr/local/bin/php-cgi -a 127.0.0.1 -p 9000 -u www The port should be 10005 for « fastcgi_pass 127.0.0.1:10005; » Regards. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
fast CGI
I have a .fcgi perl routine which has at the top of it: #!/usr/bin/perl use FCGI; # imports the library and when I attempt to execute this .fcgi, I get the following error message: Can't locate FCGI.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.5/mach /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.5/BSDPAN /usr/local/lib/perl5/5.8.5/mach /usr/local/lib/perl5/5.8.5 .) at ./test.fcgi line 3 BEGIN failed--compilation aborted at ./test.fcgi line 3. I tried compiling the perl port using -DWITH_FCGI ... that was a stab in the dark How can I get this FCGI module ? Thanks, Jim ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: fast CGI
Hello, On Thu, Jan 20, 2005 at 03:45:23AM -0800 or thereabouts, Jim Pazarena wrote: I have a .fcgi perl routine which has at the top of it: #!/usr/bin/perl use FCGI; # imports the library and when I attempt to execute this .fcgi, I get the following error message: Can't locate FCGI.pm in @INC (@INC contains: Go for these: /usr/ports/www/mod_fastcgi /usr/ports/www/p5-FastCGI Cheers, Martin -- martin hudec * 421 907 303 393 * [EMAIL PROTECTED] * http://www.aeternal.net Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws. Douglas Adams, The Hitchhiker's Guide to the Galaxy pgp4C9ZkMqp3y.pgp Description: PGP signature
Re: fast CGI
On Thu, Jan 20, 2005 at 03:45:23AM -0800, Jim Pazarena wrote: I have a .fcgi perl routine which has at the top of it: I tried compiling the perl port using -DWITH_FCGI ... that was a stab in the dark Maybe the ports will help you: cd /usr/ports make search key=fcgi or go to http://www.freebsd.org/ports/ and search for 'fcgi'.. HTH -- Thanos Tsouanas [EMAIL PROTECTED] .: Sians http://thanos.sians.org/ .: http://www.sians.org/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]