From owner-freebsd-questions@freebsd.org Fri Jan 29 19:04:37 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FACCA72F7C for ; Fri, 29 Jan 2016 19:04:37 +0000 (UTC) (envelope-from markhamb@corp.ssimicro.com) Received: from mail.ssimicro.com (mail.ssimicro.com [64.247.129.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.ssimicro.com", Issuer "RapidSSL SHA256 CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B6321DF0 for ; Fri, 29 Jan 2016 19:04:36 +0000 (UTC) (envelope-from markhamb@corp.ssimicro.com) Received: from markham.ssimicro.com (markham.ssimicro.com [64.247.130.99]) (authenticated bits=0) by mail.ssimicro.com (8.14.7/8.14.7) with ESMTP id u0TJ1ARY090389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 29 Jan 2016 12:01:10 -0700 (MST) Subject: Re: How to reference PHP path in web server jail to app server in jail To: freebsd-questions@freebsd.org References: From: markham breitbach X-Enigmail-Draft-Status: N1110 Message-ID: <56ABB7BD.2000003@corp.ssimicro.com> Date: Fri, 29 Jan 2016 12:04:29 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2016 19:04:37 -0000 You can't directly point from one jail to another. That's kinda the point of jails :) However, you could use a nullfs mount at the host (prison?) level: # mount_mullfs -ro /wiki.jailnet.private/usr/local/www/wiki/webroot /webs= erverjailroot/mountpoint This will allow readonly access from the webserver to the php-app -Markham On 2016-01-29 11:33 AM, Sergei G wrote: > Hi, > > I currently have this setup: > > * Host is running nginx web server > * Host is running a number of jails. I usually have a jail per applica= tion. > * nginx configuration file serves content that's installed in a jail by= > specifying path to a jail; jailed PHP application has paths relative to= a > jail > > I'd like to move web server into its own jail, but I don't know how I w= ould > instruct web server to locate application's (PHP) jail files. > > Any ideas? > > Parts of my nginx configuration file: > > server { > ... > # this is a host's path; it would change if nginx in its own jail > location / { > root /wiki.jailnet.private/usr/local/www/wiki/webroot; > } > > # parts of foswiki configuration > location ~ ^/bin/([aa-z]+) { > ... > # talk to fascgi through TCP/IP. I did not attempt to use Unix > sockets. It would be nice. > fastcgi_pass 192.168.3.13:90001 > # path is valid inside the wiki jail; that will stay the same > fastcgi_param SCRIPT_FILENAME > /usr/local/www/wiki/webroot/$fastcgi_script_name; > ... > } > > So, If I was to move nginx to its own jail I don't know how to replicat= e > root /wiki.jailnet.private/usr/local/www/wiki/webroot; > line inside jail to point to another jail's filesystem. > > I am not that good with nullfs, so if you could point to how to underst= and > it that would be great. > > > Thank you > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd= =2Eorg"