Setting http_methods in CustomBuild kills Apache

doumu

Verified User
Joined
Aug 13, 2019
Messages
22
Setting http_methods in CustomBuild killed Apache.

Allowed the methods following the guide here.
--
Code:
[root@host custombuild]# ./build set http_methods GET:HEAD:POST:PROPFIND:OPTIONS:PUT:DELETE:MKCOL:COPY:MOVE
Changed http_methods option from GET:HEAD:POST:PROPFIND:OPTIONS:PUT:DELETE:MKCOL:COPY:MOVE:REPORT: to GET:HEAD:POST:PROPFIND:OPTIONS:PUT:DELETE:MKCOL:COPY:MOVE
[root@host custombuild]# ./build rewrite_confs
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Using xxx.xxx.xxx.xxx for your server IP
PHP has been secured.
Restarting php-fpm73.
Restarting php-fpm74.
Restarting apache.
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

Tailing output in /var/log/messages:
--
Dec 19 19:13:06 host systemd: Starting The Apache HTTP Server...
Dec 19 19:13:06 host httpd: AH00526: Syntax error on line 9 of /etc/httpd/conf/extra/httpd-directories.conf:
Dec 19 19:13:06 host httpd: AllowMethods: Invalid Method 'REPORTALL'
Dec 19 19:13:06 host systemd: httpd.service: main process exited, code=exited, status=1/FAILURE
--

It was changed in these files.
--
[root@host custombuild]# grep -ri REPORTALL /etc/
/etc/httpd/conf/extra/httpd-directories-old.conf: AllowMethods GET HEAD POST PROPFIND OPTIONS PUT DELETE MKCOL COPY MOVE REPORT REPORTALL
/etc/httpd/conf/extra/httpd-directories-new.conf: AllowMethods GET HEAD POST PROPFIND OPTIONS PUT DELETE MKCOL COPY MOVE REPORT REPORTALL
--
[root@host ~]# ls -ahl /etc/httpd/conf/extra/httpd-directories.conf
lrwxrwxrwx 1 root root 26 Dec 19 20:05 /etc/httpd/conf/extra/httpd-directories.conf -> httpd-directories-old.conf
--

Manually editing the conf file resolves the issue.
 
Back
Top