Thank you Richard, that mostly worked for me.
But I notice that when I switch it from FastCGI to Civitweb that the S3-style subdomains (e.g., bucket-name.domain-name.com) stops working and I haven't been able to figure out why on my own.
- ceph.conf excerpt:
[client.radosgw.gateway]
host = nuc1
keyring = /etc/ceph/ceph.client.radosgw.keyring
log file = /var/log/ceph/client.radosgw.gateway.log
rgw dns name = s3.e-prepared.com
# FASTCGI SETTINGS
rgw socket path = ""
rgw print continue = false
rgw frontends = fastcgi socket_port=9000 socket_host=0.0.0.0
# CIVETWEB SETTINGS
#rgw frontends = civetweb port=7480
- httpd.conf excerpt
<VirtualHost *:80>
ServerName s3.e-prepared.com
ServerAlias *.s3.e-prepared.com
ServerAlias s3.amazonaws.com
ServerAlias *.amazonaws.com
DocumentRoot /srv/www/html/e-prepared_com/s3
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]
SetEnv proxy-nokeepalive 1
# FASTCGI SETTINGS
ProxyPass / fcgi://localhost:9000/
# CIVETWEB SETTINGS
#ProxyPass / http://localhost:7480/
#ProxyPassReverse / http://localhost:7480/
</VirtualHost>
With the above FastCGI settings, S3-style subdomains work. Eg.
[root@nuc1 ~]# curl http://roger-public.s3.e-prepared.com/index.html
<!DOCTYPE html>
<html>
<body>
<p>Hello, World!</p>
</body>
</html>
But when I comment out the fastcgi settings, uncomment the civetweb settings, and restart ceph-radosgw and http (and disable selinux), I get output like this:
[root@nuc1 ~]# curl http://roger-public.s3.e-prepared.com/index.html
<?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchBucket</Code><BucketName>index.html</BucketName><RequestId>tx000000000000000000003-00596536b0-1465f8-default</RequestId><HostId>1465f8-default-default</HostId></Error>
However I can still access the bucket the old-fashioned way (e.g., domain-name.com/bucket-name) even with Civetweb running:
[root@nuc1 ~]# curl http://s3.e-prepared.com/roger-public/index.html
<!DOCTYPE html>
<html>
<body>
<p>Hello, World!</p>
</body>
</html>
Thoughts, anyone?
Roger
On Tue, Jul 11, 2017 at 10:22 AM Richard Hesketh <richard.hesketh@xxxxxxxxxxxx> wrote:
On 11/07/17 17:08, Roger Brown wrote:
> What are some options for migrating from Apache/FastCGI to Civetweb for RadosGW object gateway *without* breaking other websites on the domain?
>
> I found documention on how to migrate the object gateway to Civetweb (http://docs.ceph.com/docs/luminous/install/install-ceph-gateway/#migrating-from-apache-to-civetweb), but not seeing how not to break the other sites when it says, "Migrating to use Civetweb basically involves removing your Apache installation."
>
> Example:
> @domain.tld, www.domain.tld <http://www.domain.tld>: served by Apache
> s3.domain.tld, *.s3.domain.tld: was served by Apache on the same server, but I want to serve it by Civetweb (maybe on different server) because I hear FastCGI support is going away.
I think it switching off apache is assumed because you can't have both listening on the same port. If I were you, I would leave apache listening on port 80/443, set up the RGW civetweb to run on some other port, and then configure your relevant vhosts in apache to reverse proxy to the civetweb install instead so that no client configuration has to change. The civetweb config is easy - just "rgw_frontends = civetweb port=8080" or whatever free port you want to use - you should be able to find plenty of guides on setting up an apache vhost as a reverse proxy if you google it.
Rich
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com