If you are having trouble, please look over our docs below.


Basic command

Since we are rolling our own Apache, we change it name to prevent conflict from main Ubuntu Repository. We named our Apache to apache2-rc.

You don't have to do any of this command if you are managing your server using RunCloud Panel

# Start
systemctl start apache2-rc

# Stop
systemctl stop apache2-rc

# Reload
systemctl reload apache2-rc

# Restart
systemctl restart apache2-rc

# Start apache2 after reboot
systemctl enable apache2-rc

# Disable apache2 automatic start after reboot
systemctl disable apache2-rc

# Config Test
apachectl -t

Apache location

# Installation location

# Config location

Web application config

Do not change this config manually since it will be overwrite by RunCloud

# If your web application name is myapp, config will resides inside

Multi-Processing Modules (MPM)

By default, RunCloud uses event to make use of multiple threads and creating multiple task at once. If event doesn’t work with your configuration, you can change it to worker.

# Edit config file
vi /etc/apache2-rc/httpd.conf

You will find these lines

# Dynamic Shared Object (DSO) MPM
LoadModule mpm_event_module modules/
#LoadModule mpm_worker_module modules/

Change it to worker

# Dynamic Shared Object (DSO) MPM
#LoadModule mpm_event_module modules/
LoadModule mpm_worker_module modules/

After that, save your apache config and restart apache2 server

systemctl restart apache2-rc

To make sure your apache2 server successfully run as worker MPM, you can use this command to check Server MPM:

runcloud@testserver:~# httpd -V
Server version: Apache/2.4.29 (Unix)
Server built:   Dec 22 2017 22:11:48
Server's Module Magic Number: 20120211:68
Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM:     worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D HTTPD_ROOT="/RunCloud/Packages/apache2-rc"
 -D SUEXEC_BIN="/RunCloud/Packages/apache2-rc/bin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2-rc/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2-rc/httpd.conf"