mirror of
https://github.com/ceph/ceph
synced 2025-04-11 04:02:04 +00:00
doc: Updates the configuration of mod_proxy_fcgi in terms of localhost
tcp and unix domain socket. Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
This commit is contained in:
parent
b13e58afe7
commit
d198d69bcc
@ -68,47 +68,51 @@ Configuration
|
|||||||
=============
|
=============
|
||||||
|
|
||||||
Earlier RADOS Gateway had to be configured with ``Apache`` and ``mod_fastcgi``.
|
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
|
Now, ``mod_proxy_fcgi`` module is used instead of ``mod_fastcgi``.
|
||||||
doesn't come under a free license. ``mod_proxy_fcgi`` works differently than a
|
``mod_proxy_fcgi`` works differently than a traditional FastCGI module. This
|
||||||
traditional FastCGI module. This module requires the service of ``mod_proxy``
|
module requires the service of ``mod_proxy`` which provides support for the
|
||||||
which provides support for the FastCGI protocol. So, to be able to handle
|
FastCGI protocol. So, to be able to handle FastCGI protocol, both ``mod_proxy``
|
||||||
FastCGI protocol, both ``mod_proxy`` and ``mod_proxy_fcgi`` have to be present
|
and ``mod_proxy_fcgi`` have to be present in the server. Unlike ``mod_fastcgi``,
|
||||||
in the server. Unlike ``mod_fastcgi``, ``mod_proxy_fcgi`` cannot start the
|
``mod_proxy_fcgi`` cannot start the application process. Some platforms have
|
||||||
application process. Some platforms have ``fcgistarter`` for that purpose.
|
``fcgistarter`` for that purpose. However, external launching of application
|
||||||
However, external launching of application or process management may be available
|
or process management may be available in the FastCGI application framework
|
||||||
in the FastCGI application framework in use.
|
in use.
|
||||||
|
|
||||||
``Apache`` can be configured in a way that enables ``mod_proxy_fcgi`` to be used
|
``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
|
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
|
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
|
The following steps show the configuration in Ceph's configuration file i.e,
|
||||||
domain socket. ::
|
``/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:
|
||||||
|
|
||||||
|
#. 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``::
|
||||||
|
|
||||||
[client.radosgw.gateway]
|
[client.radosgw.gateway]
|
||||||
host = gateway
|
host = {hostname}
|
||||||
keyring = /etc/ceph/keyring.radosgw.gateway
|
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
|
||||||
|
|
||||||
; ********
|
#. Add the following content in ``/etc/httpd/conf.d/rgw.conf``:
|
||||||
; tcp fastcgi
|
|
||||||
rgw socket path = ""
|
|
||||||
rgw frontends = fastcgi socket_port=9000 socket_host=0.0.0.0
|
|
||||||
|
|
||||||
#. Modify Apache's configuration file so that ``mod_proxy_fcgi`` can be used
|
|
||||||
with localhost tcp.
|
|
||||||
|
|
||||||
Debian/Ubuntu::
|
Debian/Ubuntu::
|
||||||
|
|
||||||
<VirtualHost *:80>
|
<VirtualHost {IP ADDRESS}:80>
|
||||||
ServerName localhost
|
ServerName localhost
|
||||||
DocumentRoot /var/www/html
|
DocumentRoot /var/www/html
|
||||||
|
|
||||||
ErrorLog /var/log/apache2/error.log
|
ErrorLog /var/log/apache2/rgw_error.log
|
||||||
CustomLog /var/log/apache2/access.log combined
|
CustomLog /var/log/apache2/rgw_access.log combined
|
||||||
|
|
||||||
LogLevel debug
|
|
||||||
|
|
||||||
|
# LogLevel debug
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
@ -116,20 +120,20 @@ Apache 2.4, needs to be configured for use with localhost tcp.
|
|||||||
|
|
||||||
SetEnv proxy-nokeepalive 1
|
SetEnv proxy-nokeepalive 1
|
||||||
|
|
||||||
ProxyPass / fcgi://127.0.01:9000/
|
ProxyPass / fcgi://localhost:9000/
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
CentOS/RHEL::
|
CentOS/RHEL::
|
||||||
|
|
||||||
<VirtualHost *:80>
|
<VirtualHost {IP ADDRESS}:80>
|
||||||
ServerName localhost
|
ServerName localhost
|
||||||
DocumentRoot /var/www/html
|
DocumentRoot /var/www/html
|
||||||
|
|
||||||
ErrorLog /var/log/httpd/error.log
|
ErrorLog /var/log/httpd/rgw_error.log
|
||||||
CustomLog /var/log/httpd/access.log combined
|
CustomLog /var/log/httpd/rgw_access.log combined
|
||||||
|
|
||||||
LogLevel debug
|
|
||||||
|
|
||||||
|
# LogLevel debug
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
@ -137,50 +141,47 @@ Apache 2.4, needs to be configured for use with localhost tcp.
|
|||||||
|
|
||||||
SetEnv proxy-nokeepalive 1
|
SetEnv proxy-nokeepalive 1
|
||||||
|
|
||||||
ProxyPass / fcgi://127.0.01:9000/
|
ProxyPass / fcgi://localhost:9000/
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
#. Modify Apache's configuration file so that ``mod_proxy_fcgi`` can be used
|
#. For distros with Apache 2.4.9 or later that support Unix Domain Socket,
|
||||||
through unix domain socket.
|
append the following configuration to ``/etc/ceph/ceph.conf``::
|
||||||
|
|
||||||
Debian/Ubuntu::
|
[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
|
||||||
|
|
||||||
<VirtualHost *:80>
|
#. Add the following content in ``/etc/httpd/conf.d/rgw.conf``::
|
||||||
ServerName localhost
|
|
||||||
DocumentRoot /var/www/html
|
|
||||||
|
|
||||||
ErrorLog /var/log/apache2/error.log
|
|
||||||
CustomLog /var/log/apache2/access.log combined
|
|
||||||
|
|
||||||
LogLevel debug
|
|
||||||
|
|
||||||
|
|
||||||
RewriteEngine On
|
|
||||||
|
|
||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
|
||||||
|
|
||||||
ProxyPass / unix:///tmp/.radosgw.sock|fcgi://localhost:9000/ disablereuse=On
|
|
||||||
</VirtualHost>
|
|
||||||
|
|
||||||
CentOS/RHEL::
|
CentOS/RHEL::
|
||||||
|
|
||||||
<VirtualHost *:80>
|
<VirtualHost {IP ADDRESS}:80>
|
||||||
ServerName localhost
|
ServerName localhost
|
||||||
DocumentRoot /var/www/html
|
DocumentRoot /var/www/html
|
||||||
|
|
||||||
ErrorLog /var/log/httpd/error.log
|
ErrorLog /var/log/httpd/rgw_error.log
|
||||||
CustomLog /var/log/httpd/access.log combined
|
CustomLog /var/log/httpd/rgw_access.log combined
|
||||||
|
|
||||||
LogLevel debug
|
|
||||||
|
|
||||||
|
# LogLevel debug
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
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/
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
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. ::
|
#. 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
|
ceph-authtool -C -n client.radosgw.gateway --gen-key /etc/ceph/keyring.radosgw.gateway
|
||||||
|
Loading…
Reference in New Issue
Block a user