web analytics

APE on port 80 – Installation and Setup in cpanel server

Version Installed – 1.1.1 and 1.1.2-dev are installed. Can switch as needed.
Config file – /usr/local/src/APE/bin/ape.conf

1) cd /usr/local/src

2) wget http://www.ape-project.org/stable/APE_Server-1.1.1.amd64.bin.tar.gz

3) tar -xzvf APE_Server-1.1.1.amd64.bin.tar.gz

4) cd APE_Server/bin

5) ./aped (notice it is a dot followed by a slash)

6) This will start APE. You may issue a Ctl+C and edit the file ape.conf in the same location as follows.

port = 80
daemon = yes
ip_listen = (put your IP address here)
domain = abc.com (put your domain name here)

7) Now we need to assign a dedicated IP address for ape.abc.com from WHM -> Edit DNS -> abc.com

8) DNS Functions -> Edit DNS zone -> abc.com and add the following entry

ape     14400     IN      A
*.ape 14400 IN CNAME ape
Save the changes
Also go to /usr/local/apache/conf/userdata/std/2/abc/abc.com/extra.conf  and add the following. If the folders/files are not present, create them.
ServerAlias 0.ape.abc.com
ServerAlias 1.ape.abc.com
ServerAlias 2.ape.abc.com
ServerAlias 3.ape.abc.com
ServerAlias 4.ape.abc.com
ServerAlias 5.ape.abc.com
ServerAlias 6.ape.abc.com
ServerAlias 7.ape.abc.com
ServerAlias 8.ape.abc.com
ServerAlias 9.ape.abc.com
ServerAlias *.ape.abc.com
ServerAlias ape.abc.com
Now run the following  script so that cpanel accepts the changes.
/scripts/ensure_vhost_includes –all-users

Now, do the following. Below we are installing an interface which lets us check whether the APE installation we did is successful or not.

9) cd /home/abc/public_html

10) wget http://www.ape-project.org/stable/APE_JSF-1.1.0.tar.gz

11) tar -xzvf APE_JSF-1.1.0.tar.gz

12) cd APE_JSF/ Demos/

13) cp -pv config.js config.js.default

14) vi config.js
APE.Config.baseUrl = ‘http://abc.com/APE_JSF’; //APE JSF
APE.Config.domain = ‘abc.com’;
APE.Config.server = ‘ape.abc.com:80’; //APE server URL

15) Open port 6969 in /etc/csf/csf.conf and restart CSF if you are using port 6969 instead of 80

vi /etc/csf/csf.conf

TCP_IN =”6969″ (add it after the existing ports there)

Save and quit the file, then restart csf

csf -r

16) Now add a startup script for APE in /etc/init.d/aped

#! /bin/sh
# /etc/init.d/aped
# chkconfig: 2345 85 15
# description: APE Daemon
# processname: APE Daemon

# Install the service with chkconfig –add aped

# Define where ape is installed.
# The trailing slash is required ( Example : /my/path/bin/ )

# Define the PID File

# Source function library.
. /etc/init.d/functions

DAEMON=”/usr/local/src/APE_Server/bin/aped –cfg ${APE_DIRECTORY}ape.conf > /dev/null”

start() {

echo -n “Starting APE… ”

daemon $DAEMON
[ $RETVAL = 0 ] && touch /var/lock/subsys/aped
return $RETVAL

stop() {
echo “Stopping APE…”
kill `cat /var/run/aped.pid`
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/aped

case “$1” in
echo “Usage:  {start|stop|restart}”
exit 1
exit $RETVAL

Now we need to make the script executable, and try starting ape with it.

17) Chmod 755 /etc/init.d/aped

18) /etc/init.d/aped start

19) Now we need to configure ape and apache to run on port 80 by default

20) Go to WHM -> Service Configuration -> Apache configuration -> Reserverd IPS Editor and check the box to the right of any dedicated IP say This is the dedicated IP we assigned for ape.abc.com. This will let apache listen on all IP addresses other than

21) Again go to IP Functions -> Show/Edit Reserved IPS and check the IP Save the changes.

22) Try restarting apache and ape now and see if they are running on port 80
tcp        0      0      *                   LISTEN      4295/httpd
tcp        0      0   *                   LISTEN      25397/aped

If you see references for both http and ape on port 80, it should be working

23) You can now test the working of APE at http://abc.com/APE_JSF/Tools/Check/

24) The launch test should return no errors, but even if it does, it may not be accurate. So give minimum importance for that and give priority on site working. If site works, then everything is okay.

2 comments to APE on port 80 – Installation and Setup in cpanel server

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>