From d198d69bccfb73a524d21a9bcf6cb21cbe9dc005 Mon Sep 17 00:00:00 2001 From: Nilamdyuti Goswami Date: Thu, 2 Apr 2015 19:42:54 +0530 Subject: [PATCH] doc: Updates the configuration of mod_proxy_fcgi in terms of localhost tcp and unix domain socket. Signed-off-by: Nilamdyuti Goswami --- man/8/radosgw.rst | 117 +++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git a/man/8/radosgw.rst b/man/8/radosgw.rst index 372bc72fd9e19..e0d67a6505cf0 100644 --- a/man/8/radosgw.rst +++ b/man/8/radosgw.rst @@ -68,47 +68,51 @@ Configuration ============= Earlier RADOS Gateway had to be configured with ``Apache`` and ``mod_fastcgi``. -Now, ``mod_proxy_fcgi`` module is used instead of ``mod_fastcgi`` as the later -doesn't come under a free license. ``mod_proxy_fcgi`` works differently than a -traditional FastCGI module. This module requires the service of ``mod_proxy`` -which provides support for the FastCGI protocol. So, to be able to handle -FastCGI protocol, both ``mod_proxy`` and ``mod_proxy_fcgi`` have to be present -in the server. Unlike ``mod_fastcgi``, ``mod_proxy_fcgi`` cannot start the -application process. Some platforms have ``fcgistarter`` for that purpose. -However, external launching of application or process management may be available -in the FastCGI application framework in use. +Now, ``mod_proxy_fcgi`` module is used instead of ``mod_fastcgi``. +``mod_proxy_fcgi`` works differently than a traditional FastCGI module. This +module requires the service of ``mod_proxy`` which provides support for the +FastCGI protocol. So, to be able to handle FastCGI protocol, both ``mod_proxy`` +and ``mod_proxy_fcgi`` have to be present in the server. Unlike ``mod_fastcgi``, +``mod_proxy_fcgi`` cannot start the application process. Some platforms have +``fcgistarter`` for that purpose. However, external launching of application +or process management may be available in the FastCGI application framework +in use. ``Apache`` can be configured in a way that enables ``mod_proxy_fcgi`` to be used with localhost tcp or through unix domain socket. ``mod_proxy_fcgi`` that doesn't support unix domain socket such as the ones in Apache 2.2 and earlier versions of -Apache 2.4, needs to be configured for use with localhost tcp. +Apache 2.4, needs to be configured for use with localhost tcp. Later versions of +Apache like Apache 2.4.9 or later support unix domain socket and as such they +allow for the configuration with unix domain socket instead of localhost tcp. -#. Modify ``/etc/ceph/ceph.conf`` file to make radosgw use tcp instead of unix - domain socket. :: +The following steps show the configuration in Ceph's configuration file i.e, +``/etc/ceph/ceph.conf`` and the gateway configuration file i.e, +``/etc/httpd/conf.d/rgw.conf`` with localhost tcp and through unix domain socket: - [client.radosgw.gateway] - host = gateway - keyring = /etc/ceph/keyring.radosgw.gateway +#. For distros with Apache 2.2 and early versions of Apache 2.4 that use + localhost TCP and do not support Unix Domain Socket, append the following + contents to ``/etc/ceph/ceph.conf``:: - ; ******** - ; tcp fastcgi - rgw socket path = "" - rgw frontends = fastcgi socket_port=9000 socket_host=0.0.0.0 + [client.radosgw.gateway] + host = {hostname} + keyring = /etc/ceph/ceph.client.radosgw.keyring + rgw socket path = "" + log file = /var/log/radosgw/client.radosgw.gateway.log + rgw frontends = fastcgi socket_port=9000 socket_host=0.0.0.0 + rgw print continue = false -#. Modify Apache's configuration file so that ``mod_proxy_fcgi`` can be used - with localhost tcp. +#. Add the following content in ``/etc/httpd/conf.d/rgw.conf``: Debian/Ubuntu:: - + ServerName localhost DocumentRoot /var/www/html - ErrorLog /var/log/apache2/error.log - CustomLog /var/log/apache2/access.log combined - - LogLevel debug + ErrorLog /var/log/apache2/rgw_error.log + CustomLog /var/log/apache2/rgw_access.log combined + # LogLevel debug RewriteEngine On @@ -116,20 +120,20 @@ Apache 2.4, needs to be configured for use with localhost tcp. SetEnv proxy-nokeepalive 1 - ProxyPass / fcgi://127.0.01:9000/ + ProxyPass / fcgi://localhost:9000/ + CentOS/RHEL:: - + ServerName localhost DocumentRoot /var/www/html - ErrorLog /var/log/httpd/error.log - CustomLog /var/log/httpd/access.log combined - - LogLevel debug + ErrorLog /var/log/httpd/rgw_error.log + CustomLog /var/log/httpd/rgw_access.log combined + # LogLevel debug RewriteEngine On @@ -137,50 +141,47 @@ Apache 2.4, needs to be configured for use with localhost tcp. SetEnv proxy-nokeepalive 1 - ProxyPass / fcgi://127.0.01:9000/ - - -#. Modify Apache's configuration file so that ``mod_proxy_fcgi`` can be used - through unix domain socket. - - Debian/Ubuntu:: - - - ServerName localhost - DocumentRoot /var/www/html - - ErrorLog /var/log/apache2/error.log - CustomLog /var/log/apache2/access.log combined - - LogLevel debug + ProxyPass / fcgi://localhost:9000/ + - RewriteEngine On +#. For distros with Apache 2.4.9 or later that support Unix Domain Socket, + append the following configuration to ``/etc/ceph/ceph.conf``:: - RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] + [client.radosgw.gateway] + host = {hostname} + keyring = /etc/ceph/ceph.client.radosgw.keyring + rgw socket path = /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock + log file = /var/log/radosgw/client.radosgw.gateway.log + rgw print continue = false - ProxyPass / unix:///tmp/.radosgw.sock|fcgi://localhost:9000/ disablereuse=On - +#. Add the following content in ``/etc/httpd/conf.d/rgw.conf``:: CentOS/RHEL:: - + ServerName localhost DocumentRoot /var/www/html - ErrorLog /var/log/httpd/error.log - CustomLog /var/log/httpd/access.log combined - - LogLevel debug + ErrorLog /var/log/httpd/rgw_error.log + CustomLog /var/log/httpd/rgw_access.log combined + # LogLevel debug RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] - ProxyPass / unix:///tmp/.radosgw.sock|fcgi://localhost:9000/ disablereuse=On + SetEnv proxy-nokeepalive 1 + + ProxyPass / unix:///var/run/ceph/ceph.radosgw.gateway.fastcgi.sock|fcgi://localhost:9000/ + + The latest version of Ubuntu i.e, 14.04 has ``Apache 2.4.7`` which does not + have Unix Domain Support in it and as such has to be configured with localhost + tcp. + #. Generate a key for radosgw to use for authentication with the cluster. :: ceph-authtool -C -n client.radosgw.gateway --gen-key /etc/ceph/keyring.radosgw.gateway -- 2.39.5