Two ports, one Apache server per port

Two ports, one Apache server per port

Post by Larry Chi » Fri, 24 Jul 1998 04:00:00



Hello c.i.w.s.u ,
Problem:
 I am trying to serve two different ports on my Sun workstation
with each port having a dedicated Apache 1.3.0 server. I am not
successful, which is frustrating because I was successful with
a 1.2.6 version of the Apache server on one port and a 1.3.0
version on the other.

Symptoms:
 In the configuration with both servers being version 1.3.0,
whether I have the port 8081 server running or not, when I
"apachectl start" the 8080 server, it insists on conecting to
port 8081. All the obvious *.conf file settings are for 8080.
( See *.conf setup info below ).

 The 8081 httpd.pid file is updated, so I can't "apachectl stop"
from the 8080 sbin directory unless I copy the 8081 httpd.pid
file .

 "ps -ef" shows that it is the 8081 httpd that is running.

 Log files in the 8081 server directory tree are updated instead
of the 8080 directory tree. In fact, there are no log files at
all in the 8080 directory tree. If I have the 8081 server running,
the startup for the 8080 server fails because the 8081 port is
unavailable.

Background:
 Port 8080 was being served by the 1.2.6 server. Port 8080 was
how the rest of my co-workers accessed my "released" HTML documents
& cgi scripts.

 This week I successfully setup and ran version 1.3.0 on port 8081,
simultaneously with the version 1.2.6 server. I intend to use port
8081 for development.

 The 1.3.0 tar package was untarred into a directory ~/apache_1.3.0 .
I built the first 1.3.0 server into directory ~/apache ; this is
server set to port 8081.

 The second 1.3.0 server was built into directory ~/apache_pub/ from
directory apache_1.3.0; it is supposed to connect to port 8080.

 The ~/apache_pub/etc/.conf files were copied from ~/apache/etc/*.conf
versions, and then edited to change "/apache/" refs to "/apache_pub/"
and "8081" to "8080". This includes "Port" and "BindAddress"
and "LockFile" and "ScoreBoardFile".  I have triple-plus checked the
values of these directives .

Any help would be greatly appreciated.

Larry Ching

( warning: still learning the Apache http server )

 
 
 

Two ports, one Apache server per port

Post by Larry Chi » Sat, 25 Jul 1998 04:00:00


 I solved my problem, but I don't know how!


> Hello c.i.w.s.u ,
> Problem:
>  I am trying to serve two different ports on my Sun workstation
> with each port having a dedicated Apache 1.3.0 server. I am not
> successful, which is frustrating because I was successful with
> a 1.2.6 version of the Apache server on one port and a 1.3.0
> version on the other.

> Symptoms:
>  In the configuration with both servers being version 1.3.0,
> whether I have the port 8081 server running or not, when I
> "apachectl start" the 8080 server, it insists on conecting to
> port 8081. All the obvious *.conf file settings are for 8080.
> ...
> Background:
> ...
>  The 1.3.0 tar package was untarred into a directory ~/apache_1.3.0 .
> I built the first 1.3.0 server into directory ~/apache ; this is
> server set to port 8081.

>  The second 1.3.0 server was built into directory ~/apache_pub/ from
> directory apache_1.3.0; it is supposed to connect to port 8080.

>  The ~/apache_pub/etc/.conf files were copied from ~/apache/etc/*.conf
> versions, and then edited to change "/apache/" refs to "/apache_pub/"
> and "8081" to "8080". This includes "Port" and "BindAddress"
> and "LockFile" and "ScoreBoardFile".  I have triple-plus checked the
> values of these directives .

 I decided to repeat the install from the ~/apache_1.3.0/ directory
into the ~/apache_pub/ directory.

 First, I deleted the scripts and executables from ~/apache_pub/sbin/,
and deleted the *.conf files from ~/apache_pub/etc/. Then I defined
the compiler enviroment variable with "setenv CC gcc", and then re-ran
~/apache_1.3.0/configure :

./configure --verbose --prefix=/home/myusername/apache_pub --with-perl=/usr/local/bin/perl

 This time, I omitted the suexec setup, that I had done previously. I
did keep the ~/apache_pub/sbin/suexec file I had generated previously.

 Did "make" and "make install" with no incident.

 Edited the ~/apache_pub/etc/*.conf files this time, instead of copying
and editing the *.conf files from my other 1.3 server directory
~/apache/etc/ .

 Used ~/apache_pub/sbin/apachectl to start the server, and it started
up just fine, using port 8080. Log files are created and are in the
~/apache_pub/ directory tree instead of the ~/apache/ directory tree.

 Started ~/apache/sbin/httpd , and it's running just fine on port 8081.

 suEXEC is working for both servers.

 Why it works now, I don't know ... I do remember that I did repeat the
configure/make/make install cycle without the suEXEC setup the first time
I tried to get version 1.3.0 running in ~/apache/ .

Larry Ching

( warning: still learning the Apache http server )


 
 
 

1. One server, one IP addr, two ports, different sites?

I'm running an Apache 1.3.x which works fine.  I'm wondering if I can
use the same server to not only respond on a different port (say,
8000), but to have the site on that port be completely different.

This sounds like virtual hosting, and maybe it is, but I don't see an
obvious way to get <VirtualHost...> to use a particular port with the
SAME IP address as the usual server on port 80.

So far, I've figured out that Listen 80 and Listen 8000 both have to
be present for the server to answer on both ports.  But beyond that,
I'm a bit clueless.

If I really have to run two different servers to achieve what I want,
I can do that too, but I thought I'd ask first.

Thanks for any pointers!
--

Information Technology                         Elk Grove Village, IL 60007 USA
Virtualcolor Division                          +1 847 357 9500 voice
Fort Dearborn Company                          +1 847 357 8726 fax

2. To hell with Microsoft!

3. virtual hosts (two ports, one IP) with Apache 1.1.1

4. Linux & os/2 & w95 in the same system

5. Default Port Given Two Apache Servers?

6. LXNY Meeting 2 September 1998: Schools and Libraries Project.

7. apache listen to port 80, another standalone apache+modssl listen port 443, not working..?!

8. windows client tool

9. kernel: Limiting closed port RST response from 233 to 200 packets per second

10. Printer Port lp0 prints 1 line per 30 seconds

11. udp_recvspace - per port or per system?

12. Limit connections per port per IP