Fix #10943
invalid syntax in Apache config file examples
Status:
New
Priority:
Normal
Assignee:
-
Category:
documentation
Target version:
-
% Done:
0%
Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
In the docs section for the RGW configuration (both federated and normal RGW configs) Apache configs are used with invalid syntax:
http://ceph.com/docs/master/radosgw/federated-config/#create-a-gateway-configuration
Investigating what might be wrong I see that Apache never restarted. There is a Syntax Error in a configuration file. In this RHEL server
I am asked to check with `systemctl`:
$ sudo service httpd restart Redirecting to /bin/systemctl restart httpd.service Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Which points to the exact problem:
$ sudo systemctl status -l httpd.service httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled) Active: failed (Result: exit-code) since Wed 2015-02-18 08:15:50 PST; 14min ago Process: 13642 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS) Process: 13640 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 13640 (code=exited, status=1/FAILURE) CGroup: /system.slice/httpd.service Feb 18 08:15:50 magna123 httpd[13640]: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 30 of /etc/httpd/conf.d/rgw-magna.conf: Expected </!--ServerAlias> but saw </VirtualHost> Feb 18 08:15:50 magna123 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Feb 18 08:15:50 magna123 systemd[1]: Failed to start The Apache HTTP Server. Feb 18 08:15:50 magna123 systemd[1]: Unit httpd.service entered failed state.
The "comment" in the configuration example for Apache is invalid (comments in Apache configs should start with '#') but they are not for the examples:
FastCgiExternalServer /var/www/html/s3gw.fcgi -socket /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock <VirtualHost *:80> ServerName {fqdn} <!--Remove the comment. Add a server alias with *.{fqdn} for S3 subdomains--> <!--ServerAlias *.{fqdn}--> ServerAdmin {email.address} DocumentRoot /var/www/html RewriteEngine On RewriteRule ^/(.*) /s3gw.fcgi?%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] ...
Properly commenting those out fixed the problem for restarting apache