Fresh install apache failed

vacancy

Verified User
Joined
Jul 5, 2019
Messages
30
Apache service is not running in the new installation.

Log as follows.

***

Sep 05 20:51:10 server.xxxx.live systemd[1]: Starting The Apache HTTP Server...
Sep 05 20:51:10 server.xxxx.live httpd[13509]: AH00526: Syntax error on line 9 of /etc/httpd/conf/extra/httpd-directories.conf:
Sep 05 20:51:10 server.xxxx.live httpd[13509]: AllowMethods: Invalid Method 'ALL'
Sep 05 20:51:10 server.xxxx.live systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 05 20:51:10 server.xxxx.live kill[13511]: kill: cannot find process ""
Sep 05 20:51:10 server.xxxx.live systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 05 20:51:10 server.xxxx.live systemd[1]: Failed to start The Apache HTTP Server.
 
Hello,


Will the following commands

Code:
rm -f [COLOR=#333333]/etc/httpd/conf/extra/httpd-directories.conf
[/COLOR]cd /usr/local/directadmin/custombuild/
./build update
./build rewrite_confs


fix it?
 
The problem has improved.

But rewrite_conf has a warning like this.

***

Apache 2.4.27 and higher will not negotiate http2 with mpm_prefork. Please do not use mod_php or disable http2 in the directadmin.conf
http://www.apache.org/dist/httpd/CHANGES_2.4.27

***

Apache info

[root@server custombuild]# httpd -V
Server version: Apache/2.4.41 (Unix)
Server built: Sep 5 2019 21:31:33
Server's Module Magic Number: 20120211:88
Server loaded: APR 1.6.5, APR-UTIL 1.6.1
Compiled using: APR 1.6.5, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
 
Like it says:
Please do not use mod_php or disable http2 in the directadmin.conf
Just set this line in directadmin.conf (or change 1 to 0)
Code:
http2=0
and restart directadmin.

If you do the rewrite_confs afterwards, the message should not appear again. If you do want to use http2, you have to use something else than mpm_prefork.
 
Normally mpm_event is enabled by default, but mpm_prefork is active in this setup. I couldn't make sense.
 
This is because your php1 is set as "mod_php" in options.conf. Change your PHP to php-fpm, then rebuild everything. Apache will be with Event MPM and you can use http2.
 
Sorry for my English.
This is my config, but the website didn't load HTTP2, I installed full SSL.

Code:
#PHP Settings
php1_release=5.6
php1_mode=php-fpm
php2_release=7.2
php2_mode=php-fpm
secure_php=no
php_ini=no
php_timezone=Asia/Ho_Chi_Minh
php_ini_type=production
x_mail_header=yes

#MySQL Settings
mysql=5.6
mariadb=10.3
mysql_inst=mariadb
mysql_backup=yes
mysql_backup_gzip=no
#mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
#mysql_backup_dir=/home/admin/mysql_backups
mysql_backup_dir=/home/admin/admin_backups/mysql_backups
mysql_force_compile=no

#WEB Server Settings
webserver=apache
http_methods=GET:HEAD:POST:PUT
litespeed_serialno=trial
modsecurity=yes
modsecurity_ruleset=no
apache_ver=2.4
apache_mpm=auto
mod_ruid2=no
userdir_access=yes
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=tqtecom105.65.com
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_ver=4
squirrelmail=no
roundcube=yes
webapps_inbox_prefix=no

#ClamAV-related Settings
clamav=no
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

#Mail Settings
exim=yes
eximconf=yes
eximconf_release=4.5
blockcracking=yes
easy_spam_fighter=yes
spamd=rspamd
sa_update=daily
dovecot=yes
dovecot_conf=yes
pigeonhole=no

#FTP Settings
ftpd=pureftpd

#Statistics Settings
awstats=no
webalizer=yes

#CustomBuild Settings
custombuild=2.0
autover=no
bold=yes
clean=yes
cleanapache=yes
clean_old_tarballs=yes
clean_old_webapps=yes
downloadserver=files12.directadmin.com

#Cronjob Settings
cron=no
cron_frequency=weekly
[email protected]
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#CloudLinux Settings
cloudlinux=no
cloudlinux_beta=no
cagefs=no

#Advanced Settings
autoconf=yes
automake=yes
libtool=yes
curl=yes
new_pcre=no

php3_release=7.3
php4_release=7.4
php3_mode=php-fpm
php4_mode=php-fpm
maildir_compress=no
mail_compress=no
custombuild_plugin=yes
phpmyadmin_public=yes
ssl_configuration=intermediate
unit=no

httpd -V
Code:
Server version: Apache/2.4.41 (Unix)
Server built:   Dec  1 2019 00:37:40
Server's Module Magic Number: 20120211:88
Server loaded:  APR 1.6.5, APR-UTIL 1.6.1
Compiled using: APR 1.6.5, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    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="/etc/httpd"
 -D HAVE_SYSTEMD
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/var/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"

Many thanks for your help.
 
Thank you. Everything worked for me.

Code:
Code:
# cd /usr/local/directadmin/custombuild/
# ./build set apache_mpm event
Changed apache_mpm option from auto to event
# ./build apache
 
Back
Top