From owner-freebsd-questions@FreeBSD.ORG Thu Jul 22 22:39:33 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 863FE106566C for ; Thu, 22 Jul 2010 22:39:33 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 30F898FC14 for ; Thu, 22 Jul 2010 22:39:32 +0000 (UTC) Received: by vws7 with SMTP id 7so863175vws.13 for ; Thu, 22 Jul 2010 15:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=2KLwaxRyDLZ1qnqV6Eg4xypO8+r+a/MjleVh9yAFYmU=; b=FzZwXnbatmueGkdLmx0fPNCExEkejhvPMRRlC9F9BWtsgiPxZGmHjZMlMAfhSWKCKo g1yq4ff3ZDeVr52t1JyD9ZicS+LxcKTDfsOVEf+L5vh5upDftLEwRNdf14suudHt2YAr F9NLqZX3/Uv9C915xP38iEHPDGL/cbklRjRdk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=EfzuuH7jPJnMN41Ql8IhL4z7b22bioKgsOWaCGGKqTPwU94ttl6XAhQ0r6W9BSH6Mz JCi8K2BJafPiEvhFRNAZOy6/9vdQh1f94qMbSNjAWPxzZgqFnm/Hr4xt7wEJMBVFfNkS 4cw34qyzspUe+5/kMUnmieRbRTuttrwp4gaPw= Received: by 10.220.127.94 with SMTP id f30mr1103455vcs.75.1279838372278; Thu, 22 Jul 2010 15:39:32 -0700 (PDT) Received: from schism.local (c-71-230-240-241.hsd1.pa.comcast.net [71.230.240.241]) by mx.google.com with ESMTPS id k30sm20545483vbl.19.2010.07.22.15.39.30 (version=SSLv3 cipher=RC4-MD5); Thu, 22 Jul 2010 15:39:30 -0700 (PDT) Message-ID: <4C48C8A1.7090100@gmail.com> Date: Thu, 22 Jul 2010 18:39:29 -0400 From: Glen Barber User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Ed Flecko References: In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: How do you automatically start Apache, Bind, etc. in a jail? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 22:39:33 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 7/22/10 6:20 PM, Ed Flecko wrote: > Hi folks, > I have Apache installed in a "qjail" named "webserver" (I.P. address > 192.168.225.130) using the "pkg_add -r apache22" command, but how do > you get Apache (or Bind, etc.) to automatically start upon boot? > > I got the jail to start by adding qjail_enable="YES" to hosts' > /etc/rc.conf and I also added apache22_enable="YES", but that doesn't > seem to work. > You would need to add apache22_enable="YES" to the jail's rc.conf, not the host's. > Suggestions? > > > > Also, when I console into the jail, and issue an "apachectl start" > command, I get the following error: > > httpd: apr_sockaddr_info_get() failed for webserver > httpd: Could not reliably determine the server's fully qualified > domain name, using 127.0.0.1 for ServerName > Edit httpd.conf, adding a ServerName directive. (An example exists in the file, so you can model after that.) If you don't have a FQDN, use the jail's hostname, and add that hostname to the jail's /etc/hosts. > I figured out if I add the IP address of the jail as well as > "webserver" to the jails' hosts file, I can start Apache, but I still > get this error: > > httpd: Could not reliably determine the server's fully qualified > domain name, using 192.168.225.130 for ServerName > > What am I doing wrong? > > > > Finally, rather than installing Apache using the typical "pkg_add -r > apache22" command, is there a way to install Apache using the > ./configure script? In MY case, I know the EXACT parameters I want to > pass to the ./configure script (like enabling SSL, etc), but I don't > know how to do this in a "jail". > You can build from source if you like, but ports are easier, IMHO. Have a look here for more information on the ports tree: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html >>From the jail console, I tried: > > cd /usr/ports/www/apache22 > ./configure --enable-ssl...etc., etc., etc.??? > 'make config' to show the configuration screen; 'make install' to compile and install. > but this doesn't work. > > Do I need to do the opposite, i.e., from the HOST console: > > ./configure --prefix=/PathToJail --enable-ssl...etc., etc., etc??? > Nope; have a look at the link I pasted above. I think you might like the ports tree rather than compiling from source, since all of the "hard work" has already been taken care of for you. Regards, - -- Glen Barber -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxIyKEACgkQeHhHJjlriYVw0QCeMvja3z3manD9lHgBk7VTfocI iCoAn1F4ycv7P+dPv6GhWpghEIOgOxRm =wLii -----END PGP SIGNATURE-----