Re: One host, two SSL sites

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 20, 2009 at 09:03:17PM +0100, Miguel Angel Tormo Alfaro wrote:
> El Martes, 20 de Enero de 2009 20:40:29 John Oliver escribió:
> > I have a server I need to rebuilt, and I want to move the SSL website on
> > it onto another server (that already has it's own SSL website). I'm
> > going to use eth1 on the second server with the MAC and IP of the first
> > server, and make the httpd on the second server Listen specifically to
> > it's own IP address. I then plan on copying /etc/httpd on the first
> > server to /etc/httpd2 on the second server, copy /etc/init.d/httpd to
> > /etc/init.d/httpd2, and change all references in it to point to the
> > appropriate config directory.
> > 
> > In my new /etc/init.d/httpd2, I see:
> 
> I don't think the MAC address has anything to do with your setup.

It does for me, but not for the web server :-)

> Anyway, do you really need two separate apache instances for this? You could have one instance with two IP-based virtual hosts, that would be much easier to mantain, that's what I'd do if I were in your place.

After I have this working on this server, I'm going to rebuild the first
server and move it's site back.  So, I really wanted something that's
quick, simple, and totally separate from everything on the second
server.

If it would turn out to be easier to do this another way, that's fine.
But I remember it as always having been a no-no to even try to get SSL
working with VirtualHosts.

> On the other hand, if for some special reason you do need two instances, could you show us the contents of your /etc/init.d/httpd? It usually varies depending on the system.

Sorry, you're right... this is RHEL5 FWIW.

[root@mdadscoi conf.d]# cat /etc/init.d/httpd2
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/httpd2 ]; then
        . /etc/sysconfig/httpd2
fi

# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""

# Path to the apachectl script, server binary, and short-form for
messages.
apachectl=/usr/sbin/apachectl
httpd=${HTTPD-/usr/sbin/httpd}
prog=httpd
RETVAL=0

# check for 1.3 configuration
check13 () {
        CONFFILE=/etc/httpd2/conf/httpd.conf
        GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
        GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
        GONE="${GONE}AccessConfig|ResourceConfig)"
        if grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
                echo
                echo 1>&2 " Apache 1.3 configuration directives found"
                echo 1>&2 " please read
/usr/share/doc/httpd-2.2.10/migration.html"
                failure "Apache 1.3 config directives test"
                echo
                exit 1
        fi
}

# The semantics of these two functions differ from the way apachectl
does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init
scripts
# are expected to behave here.
start() {
        echo -n $"Starting $prog: "
        check13 || exit 1
        daemon $httpd $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch /var/lock/subsys/httpd2
        return $RETVAL
}
stop() {
        echo -n $"Stopping $prog: "
        killproc $httpd
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/httpd2
/var/run/httpd2.pid
}
reload() {
        echo -n $"Reloading $prog: "
        check13 || exit 1
        killproc $httpd -HUP
        RETVAL=$?
        echo
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status $httpd
        RETVAL=$?
        ;;
  restart)
        stop
        start
        ;;
  condrestart)
        if [ -f /var/run/httpd2.pid ] ; then
                stop
                start
        fi
        ;;
  reload)
        reload
        ;;
  graceful|help|configtest|fullstatus)
        $apachectl $@
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $prog
{start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
        exit 1
esac

exit $RETVAL

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux