Thanks for your reply.
I am sure that there is only one web server in CentOS.
All my steps are as follows:
First of all, I have set DNS, so that I can
nslookup ceph65
nslookup a.ceph65
nslookup anyother.ceph65
Then
1. yum install httpd mod_fastcgi mod_ssl
rm /etc/httpd/conf.d/welcome.conf
rm /var/www/error/noindex.html
2. vi /etc/httpd/conf/httpd.conf
-----------------------------
Listen 65080
ServerName ceph65
-----------------------------
3. make sure that
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule fastcgi_module modules/mod_fastcgi.so
LoadModule ssl_module modules/mod_ssl.so
4. Generate ssl
cd /etc/pki/tls/private/
openssl genrsa -des3 -out server.key 2048
openssl req -new -key server.key -out server.csr
cp server.key server.key.orig
openssl rsa -in server.key.orig -out server.key
openssl x509 -req -days 65535 -in server.csr -signkey server.key -out server.crt
rm server.key.orig server.csr
mv server.crt /etc/pki/tls/certs
5. vi /etc/httpd/conf.d/ssl.conf
-----------------------------
Listen 65443
<VirtualHost _default_:65443>
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
-----------------------------
6. install ceph-radosgw and radosgw-agent
yum install ceph-radosgw radosgw-agent
7. vi ceph.conf and copy to other ceph server
-----------------------------
[client.radosgw.gateway]
host = ceph65
public_addr = 192.168.8.183
rgw_dns_name = 127.0.0.1
keyring = /etc/ceph/keyring.radosgw.gateway
rgw_socket_path = /tmp/radosgw.sock
log_file = /var/log/ceph/radosgw.log
-----------------------------
8.
mkdir -p /var/lib/ceph/radosgw/ceph-radosgw.gateway
9.
ceph-authtool --create-keyring /etc/ceph/keyring.radosgw.gateway
chmod +r /etc/ceph/keyring.radosgw.gateway
ceph-authtool /etc/ceph/keyring.radosgw.gateway -n client.radosgw.gateway
--gen-key
ceph-authtool -n client.radosgw.gateway --cap osd 'allow rwx' --cap mon 'allow
rw' /etc/ceph/keyring.radosgw.gateway
ceph auth add client.radosgw.gateway -i /etc/ceph/keyring.radosgw.gateway
10. vi /etc/httpd/conf.d/fastcgi.conf
-----------------------------
FastCgiWrapper Off
-----------------------------
11. vi /etc/httpd/conf.d/rgw.conf
-----------------------------
<VirtualHost ceph65:80>
ServerName ceph65
ServerAdmin ceph65
DocumentRoot /var/www/html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*)
/s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING}
[E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
<IfModule mod_fastcgi.c>
<Directory /var/www/html>
Options +ExecCGI
AllowOverride All
SetHandler fastcgi-script
Order allow,deny
Allow from all
AuthBasicAuthoritative Off
</Directory>
</IfModule>
AllowEncodedSlashes On
ErrorLog /var/log/httpd/rgw_error_log
CustomLog /var/log/httpd/rgw_access_log combined
ServerSignature Off
SetEnv SERVER_PORT_SECURE 65443
</VirtualHost>
<VirtualHost ceph65:443>
ServerName ceph65
ServerAdmin ceph65
DocumentRoot /var/www/html
#ErrorLog logs/ssl_error_log
#TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x
\"%r\" %b"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*)
/s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING}
[E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
<IfModule mod_fastcgi.c>
<Directory /var/www/html>
Options +ExecCGI
AllowOverride All
SetHandler fastcgi-script
Order allow,deny
Allow from all
AuthBasicAuthoritative Off
</Directory>
</IfModule>
AllowEncodedSlashes On
ErrorLog /var/log/httpd/rgw_error_log
CustomLog /var/log/httpd/rgw_access_log combined
ServerSignature Off
SetEnv SERVER_PORT_SECURE 65443
</VirtualHost>
<IfModule mod_fastcgi.c>
FastCgiExternalServer /var/www/html/s3gw.fcgi -socket /tmp/radosgw.sock
</IfModule>
-----------------------------
12. vi /var/www/html/s3gw.fcgi and chmod +x /var/www/html/s3gw.fcgi
-----------------------------
#!/bin/sh
exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n client.radosgw.gateway
-----------------------------
13. rm -rf /tmp/radosgw.sock
14. start radosgw
chkconfig --add ceph-radosgw
chkconfig ceph-radosgw on
service ceph -a restart
service httpd restart
service ceph-radosgw start
service ceph-radosgw status
15. add user
radosgw-admin user create --uid admin --display-name admin
Is there something wrong with my rgw.conf or httpd.conf?
At 2014-03-15 01:07:00,"Yehuda Sadeh" <[email protected]> wrote:
>You might have a default web server set up on apache. Remove it and
>restart apache.
>
>On Fri, Mar 14, 2014 at 8:03 AM, wsnote <[email protected]> wrote:
>> OS: CentOS 6.5
>> version: ceph 0.67.7
>>
>> I have configured radosgw and start it.
>> When I surfed https://hostname:65443/, I thought it should be
>> ------------------------------------------------------------
>> <ListAllMyBucketsResult>
>> <Owner>
>> <ID>anonymous</ID>
>> <DisplayName/>
>> </Owner>
>> <Buckets/>
>> </ListAllMyBucketsResult>
>> -------------------------------------------------------------
>> But, what I saw is
>> -------------------------------------------------------------------------------
>> Index of /
>>
>> [ICO] Name Last modified Size Description
>> [ ] s3gw.fcgi 14-Mar-2014 21:16 81
>> Apache/2.2.22 (Fedora) Server at ceph65 Port 65443
>> -----------------------------------------------
>>
>> what's the possible reason for this situation?
>> Thanks.
>>
>>
>>
>> _______________________________________________
>> ceph-users mailing list
>> [email protected]
>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>>
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com