From owner-freebsd-ports-bugs@freebsd.org Wed Apr 4 23:56:23 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45069F81324 for ; Wed, 4 Apr 2018 23:56:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D2F0A7AEB5 for ; Wed, 4 Apr 2018 23:56:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 0ABE4431F for ; Wed, 4 Apr 2018 23:56:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w34NuLuI032465 for ; Wed, 4 Apr 2018 23:56:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w34NuLoW032464 for freebsd-ports-bugs@FreeBSD.org; Wed, 4 Apr 2018 23:56:21 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 227289] security/py-certbot-nginx: Wrong nginx configuration path set Date: Wed, 04 Apr 2018 23:56:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: fbsdbugzilla@csj.no X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: python@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2018 23:56:23 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227289 Bug ID: 227289 Summary: security/py-certbot-nginx: Wrong nginx configuration path set Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: python@FreeBSD.org Reporter: fbsdbugzilla@csj.no Flags: maintainer-feedback?(python@FreeBSD.org) Assignee: python@FreeBSD.org Installing nginx, py-certbot and py-certbot-nginx results in wrong behaviour when running certbot: # certbot Saving debug log to /var/log/letsencrypt/letsencrypt.log Error while running nginx -c /etc/nginx/nginx.conf -t. nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) nginx: configuration file /etc/nginx/nginx.conf test failed Certbot doesn't know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run "certbot certonly" to do so. You'll need to manually configure your web server to use the resulting certificate. Digging through the system, I eventually came across this file: /usr/local/lib/python2.7/site-packages/certbot_nginx/constants.py In constants.py, the server_root for nginx is set: CLI_DEFAULTS =3D dict( server_root=3D"/etc/nginx", ctl=3D"nginx", ) This should be set to /usr/local/etc/nginx, which is where nginx' config fi= les reside on FreeBSD. Changing server_root to /usr/local/etc/nginx and recompiling constants.py to constants.pyc and constants.pyo solves the problem and certificate requests= and renewals work as expected. System: FreeBSD 11.1-RELEASE-p9 amd64 Nginx: www/nginx-devel (1.13.10) Certbot: security/py-certbot (0.22.2,1) Certbot-nginx: security/py-certbot-nginx (0.22.2) --=20 You are receiving this mail because: You are the assignee for the bug.=