Forum

Help with FreeBSD Jail config (hiawatha + php-fpm)

pylox
21 January 2017, 15:02
Hi,

hope that anybody can help... I want to setup two jails in FreeBSD, one for Hiawatha (thanks to Hugo for the great piece of software) and one jail for PHP-FPM. Hiawatha jail works and PHP-jail works too,...but they wont work together... Aaarghh..."No input file specified. " I've searched (found also a unsolved topic in this forum) around and tested many configurations and nothing will work. I'm really frustrated now. Btw. the network connection between jails is working

Lets go in some details.
physical path to jails:
/mnt/zdata/jails/www.<domain>/ # Hiawatha Jail IP: 10.0.0.2
/mnt/zdata/jails/php7.<domain>/ # PHP-FPM jail IP: 10.0.0.3

Here is my hiawatha config:
#CGIhandler = /usr/local/bin/perl:pl
#CGIhandler = /usr/local/bin/php-cgi:php
#CGIhandler = /usr/local/bin/python:py
#CGIhandler = /usr/local/bin/ruby:rb
#CGIhandler = /usr/local/bin/ssi-cgi:shtml
#CGIextension = cgi
# FASTCGI
FastCGIserver {
FastCGIid = PHP7
ConnectTo = 10.0.0.3:2005
Extension = php
}

# VHost configuration
VirtualHost {
Hostname = www.<domain>, *.<domain>
WebsiteRoot = /var/www/www.<domain>/public
AccessLogfile = /var/www/www.<domain>/log/access.log
ErrorLogfile = /var/www/www.<domain>/log/error.log
StartFile = index.php
TimeForCGI = 60
UseFastCGI = PHP7
ExecuteCGI=yes
# CustomHeader = X-Frame-Options: sameorigin
# CustomHeader = Vary: Accept-Encoding
# RandomHeader = 64
# UseToolkit = cache-control
# EnforceFirstHostname = yes
# PreventXSS = yes
# PreventCSRF = yes


The index.php contains a simple phpinfo(). I can see in the PHP-FPM logs that an request comes in but replied with an 404.
So my question is: What settings on php-fpm.conf and php.ini are required to getting this work... Help is highly appreciated.

Greetings pylox
pylox
21 January 2017, 15:16
I've found out that this has something to do with the paths in PHP-FPM/PHP but actual i'am only confused....
Hugo Leisink
25 January 2017, 20:14
My guess is that you better ask a FreeBSD jail expert for help. I have no experience with jails, so I can't help you.
Joe Schmoe
28 January 2017, 03:19
I don't use FreeBSD jails, but I do use the chroot feature of PHP. This means I need to add

FastCGIserver {
...
ServerRoot = /var/www/site1
...
}


Correspondingly in my virtual configuration I have

VirtualHost {
...
WebsiteRoot = /var/www/site1/html
...
}



This topic has been closed.