i tried to compile under debian…. but it’s way more compli cated.

also: you probably do not need all the packages stated here… but i did not have the time to sort those out sorry for that. feel free to comment and recommend.

hostnamectl; # tested with
   Static hostname: CentosMaster
         Icon name: computer-vm
           Chassis: vm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-514.26.2.el7.x86_64
      Architecture: x86-64

mkdir /usr/src/apache
cd /usr/src/apache/
yum install wget gcc bzip2; # install basic software
wget http://mirror.23media.de/apache//httpd/httpd-2.4.27.tar.bz2; # download
tar fxvj httpd-2.4.27.tar.bz2; # unpack
cd httpd-2.4.27
chown -R root:root /usr/src/apache/

yum install apr-devel.x86_64 apr-util-devel.x86_64 apr-util-ldap.x86_64 apr-util-mysql.x86_64 apr-util-nss.x86_64 apr-util-odbc.x86_64 apr-util-openssl.x86_64 apr-util-pgsql.x86_64 apr-util-sqlite.x86_64 apr.x86_64 apr-util.x86_64 haproxy.x86_64 pcre.x86_64; # install more software

yum install pcre-devel.x86_64 pcre-static.x86_64 pcre-tools.x86_64 pcre.x86_64; # install even more software

./configure --prefix=/usr/local/apache2 --enable-http --enable-https --enable-so --enable-cgi; # configure

make -j4; # compile from source to binary with 4 threads (faster if you have the cores)

make install; # install binaries into system

/usr/local/apache2/bin/apachectl start; # start it

WARNING! NEVER EVER RUN APACHE AS ROOT ON THE INTERNET! YOU HAVE BEEN WARNED!

lsof -i -P -n; # check what is using port 80

systemctl list-unit-files|grep firewall
firewall-cmd --zone=public --add-port=80/tcp --permanent; # allow port 80
firewall-cmd --reload

/usr/local/apache2/bin/httpd -v
Server version: Apache/2.4.27 (Unix)
Server built: Jul 27 2017 07:13:53

# the main config file seems to be here
less /usr/local/apache2/conf/httpd.conf

/usr/local/apache2/bin/httpd -V
Server version: Apache/2.4.27 (Unix)
Server built: Jul 27 2017 07:13:53
Server's Module Magic Number: 20120211:68
Server loaded: APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture: 64-bit
Server MPM: worker
 threaded: yes (fixed thread count)
 forked: yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

/usr/local/apache2/bin/httpd -S

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::e68d:e824:9fcc:15f3. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
ServerRoot: "/usr/local/apache2"
Main DocumentRoot: "/usr/local/apache2/htdocs"
Main ErrorLog: "/usr/local/apache2/logs/error_log"
Mutex default: dir="/usr/local/apache2/logs/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/usr/local/apache2/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="daemon" id=2
Group: name="daemon" id=2

ideally if every worked fine you should be able to point your browser to your server’s ip address and get the „it works“ page.

congratulations! 🙂

testing performance with self made – ddos benchmark:

http://dwaves.de/2017/02/10/simple-self-made-ddos-test-of-your-site/

Security:

Secure your webserver with improved Certbot

Links:

https://www.ghacks.net/2017/05/20/hosting-websites-gnu-linux/

highly complicated documentation – http://httpd.apache.org/docs/current/en/install.html

admin