From owner-freebsd-ports@FreeBSD.ORG Fri Nov 7 11:55:19 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BD0716A4CE for ; Fri, 7 Nov 2003 11:55:19 -0800 (PST) Received: from iguana.simplexity.net (adsl-216-103-84-145.dsl.snfc21.pacbell.net [216.103.84.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9208243FF2 for ; Fri, 7 Nov 2003 11:55:18 -0800 (PST) (envelope-from ocrow@simplexity.net) Received: from localhost (vp27ad6osjvog7xv@localhost [127.0.0.1]) hA7JtHs2011820 for ; Fri, 7 Nov 2003 11:55:17 -0800 (PST) (envelope-from ocrow@simplexity.net) Date: Fri, 7 Nov 2003 11:55:17 -0800 (PST) From: Oliver Crow To: freebsd-ports@freebsd.org Message-ID: <20031107112443.Q11711@iguana.simplexity.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Apache mod_ssl httpd.mm semaphore; absolute EAPI_MM_CORE_PATH X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Nov 2003 19:55:19 -0000 -- Problem -- Attempting to run apache as a non root user when you have built apache with mod_ssl using the www/apache13-modssl port, the following error message appears when you start apache: > Ouch! ap_mm_create(1048576, "/var/run/httpd.mm.82733") failed > Error: MM: mm:core: failed to open semaphore file (No such file or > directory): OS: No such file or directory The apache binary is hardcoded with the directory in which to create an httpd.mm semaphore file. The default path (/var/run) is only writable by the root user. There is no httpd.conf configuration directive to change the semaphore directory, because this path must be set before the apache conf file is read. -- Solution -- Run 'httpd -V' and you will see a line like this: -D EAPI_MM_CORE_PATH="/var/run/httpd.mm" If the EAPI_MM_CORE_PATH is absolute (begins with a '/') you cannot change the path at runtime. If it is relative (doesn't begin with a slash), the actual path used will be relative to the ServerRoot which can be set using 'http -d /path/to/serverroot'. By default on FreeBSD the EAPI_MM_CORE_PATH is absolute. To change it apache must be rebuilt from the port with different configuration settings. If you built from the apache13-modssl port, create a file '/usr/ports/www/apache13-modssl/Makefile.local' with the following line: CONFIGURE_ARGS+=--runtimedir=run After rebuilding and installing the port, 'httpd -V' will have this line: -D EAPI_MM_CORE_PATH="run/httpd.mm" and you can configure apache to use a user specific directory for the httpd.mm semaphore files. For example: % httpd -d /home/user1/www will try to put the semaphore files in /home/user1/www/run/httpd.mm.%%