Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jun 2001 16:37:33 +0300
From:      teo@gecadsoftware.com
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Different document roots for secure HTTP and HTTP
Message-ID:  <20010608163733.B12627@gecadsoftware.com>
In-Reply-To: <20010608122237.K98797@everest.wananchi.com>; from wash@wananchi.com on Fri, Jun 08, 2001 at 12:22:37PM %2B0300
References:  <20010608122237.K98797@everest.wananchi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Odhiambo!
On Fri, 08 Jun 2001, Odhiambo Washington wrote:
> 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
> teo> > > ::  port 443 (HTTPS) directed to document root /var/www-secure
> teo> > > ::  port 80 (HTTP) directed to document root /var/www
> 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/
> 
There is only one binary, httpd, and it will spawn child processes, to server
clients from the network. It listens on both 80 and 443 ports, when it is
configured so (this is done in the default httpd.conf -- after install, by
adding configuration options depending on SSL variable definition via -D
parameter to httpd.)

httpd -DSSL or apachectl startssl(?) does that.

here is my rc.d script (/usr/local/etc/rc.d/apache.sh)

#!/bin/sh

PATH=/usr/local/apache/bin:/usr/local/bin:/usr/bin:/bin
export PATH

case "$1" in
  start)
    echo -n "Starting Apache Web Server: httpd"
    apachectl start
    echo "."
    ;;
  stop)
    echo -n "Stopping Apache Web Server: httpd"
    apachectl stop
    echo "."
    ;;
  restart|fullstatus|status|graceful|configtest)
    apachectl $1
    ;;
  help)
    apachectl | grep -v usage
    ;;
  *)
    echo "Usage: $0 {start|stop|restart|fullstatus|status|graceful|configtest|help}"
    exit 1
    ;;
esac

exit 0
# end

ciao 

-- teodor

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010608163733.B12627>