Forum OpenACS Q&A: how to use AOLServer and Apache on same machine at different ports

I am using a Ubuntu virtual machine.Where I installed OpenACS .To do so I had first shutdown Apache on this machine service apache2 stop

and then as per instructions given here

https://openacs.org/xowiki/ubuntu

Step 1)
aptitude install postgresql

Step 2)
aptitude install openacs

I had to shutdown Apache to do above installation.
Now the installation finishes.So I can access http://localhost:8000

but when ever I try to start Apache on this machine which was shutdown during installation I see the error


service apache2 start
* Starting web server apache2 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs

So I thought may be OpenACS installs AOLServer so Aolserver might be listening on port 80 I check

/etc/aolserver4/conf.d/openacs.sh

and here

AOL_USER=www-data
AOL_GROUP=www-data
AOL_ADDRESS=192.168.1.15
AOL_PORT=8000
RUN_DAEMON=yes

So AOLServer is not listening on port 80 upto here it is confirmed.

netstat -tualp | grep 80
tcp 0 0 somemachine.somedimain.:8000 *:* LISTEN 21321/aolserver4-ns

so netstat shows only 8000 in use.
Then why am I unable to start Apache in this case?

Hi James,

So I thought may be OpenACS installs AOLServer so Aolserver might be listening on port 80 I check

That's exactly what happens, and that's why the default openacs install listens on port 8000, to avoid conflict with the default aolserver listening on port 80.

You can easily disable aolserver's default instance putting RUN_DAEMON=no in /etc/default/aolserver4 file.

Cheers, Héctor

Thanks for helping out Hector.
That is is some useful information.I was able to get back apache running also.

Before I made changes as you mentioned
Here are the entries of /etc/default/aolserver4 file

# These variables can be customized to change main AOLserver settings.
# More changes can be done by modifying the /etc/aolserver4/aolserver4.tcl Tcl script.
#
# Note that these variables are read and interpreted by the Tcl script
# too, so avoid using shell capabilities in setting vars.
#

#USER=www-data
#GROUP=www-data
#HOSTNAME=localhost
#ADDRESS=127.0.0.1
#HTTP_PORT=80
#HTTPS_PORT=443
#CONF=/etc/aolserver4/aolserver4.tcl
#RUN_DAEMON=yes

Which after your suggestion I changed to
RUN_DAEMON=no and then restarted aolserver and started Apache2

/etc/init.d/aolserver4 restart
/etc/init.d/apache2 start

Now I am able to use both AOLserver and Apache2 at the same machine.