From owner-freebsd-questions@freebsd.org Fri Jan 29 18:33:14 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 82F4DA7242C for ; Fri, 29 Jan 2016 18:33:14 +0000 (UTC) (envelope-from sergeig.public@gmail.com) Received: from mail-vk0-x230.google.com (mail-vk0-x230.google.com [IPv6:2607:f8b0:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC601D1E for ; Fri, 29 Jan 2016 18:33:14 +0000 (UTC) (envelope-from sergeig.public@gmail.com) Received: by mail-vk0-x230.google.com with SMTP id e185so46653629vkb.1 for ; Fri, 29 Jan 2016 10:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=YynPrX1TrJ7FIdwRA2bdZRRtVFrIqcLqPBUF/Hdngog=; b=wCZ/nl3oqzEEQ9i4C68293ZbZw3sIy/OoiqNhzdoZsdjDj2Qe7opTOBvosdTWjMdRx 4baqKfPTdYlsD7c+ysYf26l4OSZNX47Yq/F/2c6zFiWdQtUkR4QxN9dl8dGl+wT4VEWO fIOHLA0hqiS3YvwRzS9527Mz7sy9k4gZnlp+sxYRRtbScOabumAY5AVYED0ezm5A2gcA 92PyjKxmoaYN8GZ+SesIseGWYCVl/m4i+Bit15tqQqPKGOcQR56Zze5vDbygkQOdd4LP 7NvXR2dKHvq7GgGeZu1nrpsFIw1wCoApgm5+HQgz7jKj5cCqIuUCDo/l3pqoY1TZLkJ/ 8nfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=YynPrX1TrJ7FIdwRA2bdZRRtVFrIqcLqPBUF/Hdngog=; b=ECbTAEm9E0sZ6QKFp53dEKP9IvnAHoneKGoDXcu7r7S9Jub1F5KmQbfJ6hMPs1eEbb OItzvqF/UKktfzjmqgNotegkP7xCqMBGm509LehR39F17KWiCVPdiFSlk1QL14PRZ0wC AjgbaTJMVeCGWbECHMMiz5IF/kROTNWPt+GJ3YUzW7i2Je3spymfGNEaY09jQU1oFBOx Qgsro4/afUz3GRQfL2nQYFBsoAKAthnKditmXZhV5Oux6odHppSVcnT5LONgrbR0rRIm MriQCPcP+8CWpP5qibodIShuVN3bLHHLCmcVPXakvVRIfX8Q6Azh4H0ajNMH1yzHnBdz 4/BQ== X-Gm-Message-State: AG10YOQv+f4rRsYO8Lmi/Q0wl7o1fcCDgzlpWcLOa3NYqtTHXWLn8EKEy9Zo7UP6V6+GmYdSoEf8FkhqtxJ7nA== MIME-Version: 1.0 X-Received: by 10.31.170.196 with SMTP id t187mr6873542vke.66.1454092393056; Fri, 29 Jan 2016 10:33:13 -0800 (PST) Received: by 10.31.174.132 with HTTP; Fri, 29 Jan 2016 10:33:13 -0800 (PST) Date: Fri, 29 Jan 2016 10:33:13 -0800 Message-ID: Subject: How to reference PHP path in web server jail to app server in jail From: Sergei G To: FreeBSD Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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 18:33:14 -0000 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 application. * 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 would 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 replicate 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 understand it that would be great. Thank you