DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 19th April 2013
Fekete Fekete is offline
New User
 
Join Date: Apr 2013
Posts: 4
Default php 5.3 fastcgi

I want an Apache 1.3 server with php-5.3 fastcgi, I get most of the installation but I can't find much documention for doing it on Apache 1.3 so php executes scripts as users. It seems pretty simple to get it running for everything .php but I'm not sure what I put in the VirtualHosts so it runs as a particular user. Also I'm not sure if this will work with Apache in a chroot.

* Help me find documentation
or
* Show me what my VirtualHost directives should look like.
Reply With Quote
  #2   (View Single Post)  
Old 19th April 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

I have this in my bookmarks: http://www.webmasterworld.com/apache/4192030.htm
Haven't tried it myself though
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 20th April 2013
Fekete Fekete is offline
New User
 
Join Date: Apr 2013
Posts: 4
Default

Well that seems to be a good start. It doesn't look like it runs php as specific users though. I can't find information on that anywhere.

It has something to do with suexec, but I can't find anything about it in the documentation I can find. I found something which mentioned doing it but with no specific directions, and I can't find it now.
Reply With Quote
  #4   (View Single Post)  
Old 20th April 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

http://httpd.apache.org/docs/2.2/suexec.html has the official docs without an example, but https://wiki.archlinux.org/index.php..._Virtual_Hosts has.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 9th May 2013
Fekete Fekete is offline
New User
 
Join Date: Apr 2013
Posts: 4
Default

I've worked out how to get suexec running from a howto which the person found the shared libraries it needs through ktrace. If someone can quickly explain how to get everything for php-fastcgi through ktrace which I am not familiar with using, I will be able to sort this out.

Otherwise, I'll just have to get rid of the chroot, which I really don't want to do.

Every guide on this leaves out vital information or requires building apache with php-fastcgi which is installed on the system. I'm pretty sure the Apache module comes with that port.
Reply With Quote
  #6   (View Single Post)  
Old 16th July 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I came across this thread today while searching for something else, and, as often happens, I got interested in it. Fekete, I hope this is useful to you, if you still have open issues with PHP and FastCGI from May.
---

PHP middleware and chroot


--

Last year, I was working with php-fpm and the nginx webserver, in setting up a rather complex infrastructure that was fairly successful, but then was never implemented in production. During testing, I was using chrooted php-fpm. And as I was doing frequent updates to the PHP components, I built a simple script for keeping the chroot structure up to date with PHP middleware. Extremely simple script, as this was just for use in a lab environment.

The php-fpm module is one possible choice of FastCGI implementations, and I chose it due to its "fit" with nginx. I recall that it requires its child processes to be assigned to specific gids and optionally a uid, in pools of process groups. That may, or may not be helpful, as it seems you want to be able to assign FastCGI processes to individual website users, rather than divided process authorization by applet/portlet groups.

Whether or not that background is helpful to you, I thought I'd share my simple script for replicating the entire PHP middleware suite into a chrooted environment.
Code:
#!/bin/sh
cd /var/www
tar cf - `ls -d /etc/php* /usr/local/{lib,bin,sbin}/php*` | tar xpf -
tar cf - `ldd /usr/local/sbin/php* | grep usr | awk '{print $7}'` | tar xpf -
---

SlowCGI

---

You might be interested in slowcgi(8). Added to -current recently, it will be included in the release of OpenBSD 5.4. Here's the background.
Reply With Quote
Reply

Tags
apache, fastcgi, openbsd

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:00 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick