From owner-freebsd-questions Fri Jun 8 8: 5:14 2001 Delivered-To: freebsd-questions@freebsd.org Received: from camel.kdsi.net (camel.kdsi.net [206.103.113.218]) by hub.freebsd.org (Postfix) with ESMTP id 5B4B237B403 for ; Fri, 8 Jun 2001 08:05:07 -0700 (PDT) (envelope-from awells@journalstar.com) Received: from journalstar.com (leepcD-231.sub-d.lee.net [208.205.127.231]) (authenticated (0 bits)) by camel.kdsi.net (8.12.0.Beta10/8.11.3) with ESMTP id f58F7Rbk022047; Fri, 8 Jun 2001 10:07:34 -0500 (CDT) (envelope-from awells@journalstar.com) Message-ID: <3B20E928.55F69232@journalstar.com> Date: Fri, 08 Jun 2001 10:03:04 -0500 From: Tony Wells X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Odhiambo Washington Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Different document roots for secure HTTP and HTTP References: <200106070516.f575Fxh08890@xyzzy.intranet.snsonline.net> <20010607210538.A6275@gecadsoftware.com> <20010608122237.K98797@everest.wananchi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG To run two servers, one for SSL and one for regular connections: %> httpd -f /path/to/httpd.conf %> httpsd -f /path/to/httpsd.conf You setup your config files so that httpd.conf listens on port 80 and httpsd.conf listens on port 443. There are some advantages to this setup. Most sites have the majority of connections coming across port 80, so you can have those connections served by a daemon that doesn't have the additional bloat of mod_ssl included. You can also keep fewer httpsd processes lingering around if you don't really need many. As far as starting the daemons at boot-time, if you compile the two daemons with a different --prefix=, say: ./configure --prefix=/usr/local/apache ./configure --prefix=/usr/local/apache+ssl For the regular and secure server respectively. You can rename the ssl server httpsd (helps when you ps) and have a shell script in /usr/local/etc/rc.d: #!/bin/sh /usr/local/apache/bin/apachectl start /usr/local/apache+ssl/bin/apachectl start (You'll have to monkey with the apachectl script for the secure server a little bit if you rename the secure version of Apache to httpsd, but I find it more convienent when running two Apache binaries to have the secure version show up with a different name during a 'ps') Ouila! Two binaries, many children, and the ability to start and stop just the secure or standard web services. Odhiambo Washington wrote: > > * teo@gecadsoftware.com [20010607 21:06]: writing on the subject 'Re: Different document roots for secure HTTP and HTTP' > teo> Hi Jim! > teo> On Thu, 07 Jun 2001, Jim Freeze wrote: > teo> > teo> > > On Thu, 07 Jun 2001 15:06:47 +1000, BSD Freak said: > teo> > > > teo> > > :: Hi all > teo> > > :: > teo> > > :: Does anyone know if it possible to run Apache with different ports for > teo> > > :: secure HTTP and ordinary HTTP. For example I want to run my web server > teo> > > :: as follows: > teo> > > :: > teo> > > :: port 443 (HTTPS) directed to document root /var/www-secure > teo> > > :: port 80 (HTTP) directed to document root /var/www > teo> > > teo> > I don't think this can be done through the config file directly. > teo> > You probably will have to resort to mod_rewrite. > teo> > With rewrite you can essentially map any url to any other url. > teo> > > teo> yes, it is possible. > teo> > teo> for 443 (secure) you have a default virtual host, see the added config > teo> stuff done by mod_ssl. You can configure a different documentRoot. > teo> same goes with 80 (http), which defaults to your documentRoot setting. > teo> > teo> > teo> give some more detail of what you want to achive. > > How does one start/run TWO binaries of the same app like apache? I am > interested in knowing HOWTO do that, especially stsrting them from rc.d/ > > TIA > > -Wash > > -- > Odhiambo Washington > Wananchi Online Ltd., > wash@wananchi.com 1st Flr Loita Hse. > Tel: 254 2 313985 Loita Street., > Fax: 254 2 313922 PO Box 10286,00100-NAIROBI,KE. > > Earth is a beta site. > > ------------------------------------------------------------------------ > Part 1.2Type: application/pgp-signature To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message