Date: Thu, 22 Jul 2010 18:39:29 -0400 From: Glen Barber <glen.j.barber@gmail.com> To: Ed Flecko <edflecko@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: How do you automatically start Apache, Bind, etc. in a jail? Message-ID: <4C48C8A1.7090100@gmail.com> In-Reply-To: <AANLkTik8fQy8ME-pRZrchSoTZabH82Ajy_ukAorcuYTd@mail.gmail.com> References: <AANLkTik8fQy8ME-pRZrchSoTZabH82Ajy_ukAorcuYTd@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C48C8A1.7090100>