Webdav as web host root?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Webdav as web host root?

Ian Macdonald
Hi,

Please let me know if this question is better posted to the Devel mailing
list, but I thought I'd ask here first.

We have a client who would like to migrate from an older WebDAV system to
ownCloud. We can migrate their files to their new ownCloud installation and
set up user accounts. However, we thought that we'd make the migration
easier by having the WebDAV URL remain the same so it doesn't have to be
adjusted in people's existing WebDAV client programs.

So, I'd like the ownCloud interface to be available as normal at, say,
owncloud.example.org. But then I'd like to have another hostname (the one
they currently use for WebDAV), say dav.example.org, set up to work just for
WebDAV. So, I'd like https://dav.example.org to point to ownCloud's WebDAV
root for use with various WebDAV clients.

I created a second apache virtualhost with the dav.example.org hostname and
then put in this rewrite rule:

RewriteRule ^(.*)$ /remote.php/webdav/$1 [PT]

However, when I connect to https://dav.example.org I get this error:
LogicException Requested uri (/) is out of base uri (/remote.php/webdav/)

When I try webdavs://dav.example.org, the request just times out.

Has anyone else tried to set up a virtual host with the WebDAV share at the
root level? What worked for you? I assume that a mod_rewrite rule should be
able to do it, but maybe there are internal ownCloud server sanity checks
that get confused by it.

Thanks in advance for any help anyone can give.

Best,
-Ian Macdonald
 GreenNet Ltd


--
Ian Macdonald
GreenNet, 56-64 Leonard Street, London EC2A 4LT
UK Tel:      0845 055 4011
Intl:        +44 20 7065 0935
My desk:     +44 20 3559 4011
Fax:         +44 20 7065 0936
XMPP/Jabber: [hidden email]
Registered in England & Wales, Company No. 02070438

GPG Fingerprint: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
GPG? What is this gibberish?
  https://en.wikipedia.org/wiki/Pretty_Good_Privacy
Why bother? https://philzimmermann.com/EN/essays/WhyIWrotePGP.html
Get GnuPG and secure your email!: https://www.gnupg.org
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Webdav as web host root?

Klaus Herberth
Maybe the P flag works:

RewriteRule ^(.*)$ http://YOURHOST/remote.php/webdav/$1 [P]

Regards,
Klaus


On 06/28/2016 01:33 PM, Ian Macdonald wrote:

> Hi,
>
> Please let me know if this question is better posted to the Devel mailing
> list, but I thought I'd ask here first.
>
> We have a client who would like to migrate from an older WebDAV system to
> ownCloud. We can migrate their files to their new ownCloud installation and
> set up user accounts. However, we thought that we'd make the migration
> easier by having the WebDAV URL remain the same so it doesn't have to be
> adjusted in people's existing WebDAV client programs.
>
> So, I'd like the ownCloud interface to be available as normal at, say,
> owncloud.example.org. But then I'd like to have another hostname (the one
> they currently use for WebDAV), say dav.example.org, set up to work just for
> WebDAV. So, I'd like https://dav.example.org to point to ownCloud's WebDAV
> root for use with various WebDAV clients.
>
> I created a second apache virtualhost with the dav.example.org hostname and
> then put in this rewrite rule:
>
> RewriteRule ^(.*)$ /remote.php/webdav/$1 [PT]
>
> However, when I connect to https://dav.example.org I get this error:
> LogicException Requested uri (/) is out of base uri (/remote.php/webdav/)
>
> When I try webdavs://dav.example.org, the request just times out.
>
> Has anyone else tried to set up a virtual host with the WebDAV share at the
> root level? What worked for you? I assume that a mod_rewrite rule should be
> able to do it, but maybe there are internal ownCloud server sanity checks
> that get confused by it.
>
> Thanks in advance for any help anyone can give.
>
> Best,
> -Ian Macdonald
>  GreenNet Ltd
>
>

_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Webdav as web host root?

Ian Macdonald
On 28/06/16 13:40, Klaus Herberth wrote:
> Maybe the P flag works:
>
> RewriteRule ^(.*)$ http://YOURHOST/remote.php/webdav/$1 [P]

No, that appears to confuse the authentication process, so there is no
authentication and I get a 403 error.

Cheers,
-Ian

--
Ian Macdonald
GreenNet, 56-64 Leonard Street, London EC2A 4LT
UK Tel:      0845 055 4011
Intl:        +44 20 7065 0935
My desk:     +44 20 3559 4011
Fax:         +44 20 7065 0936
XMPP/Jabber: [hidden email]
Registered in England & Wales, Company No. 02070438

GPG Fingerprint: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
GPG? What is this gibberish?
  https://en.wikipedia.org/wiki/Pretty_Good_Privacy
Why bother? https://philzimmermann.com/EN/essays/WhyIWrotePGP.html
Get GnuPG and secure your email!: https://www.gnupg.org
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Webdav as web host root?

Vincent Petry
Hello,

I don't think this is possible.

In many places, the clients and also the web UI, the URL parts
"remote.php/webdav" are hard-coded so it will always look there.

Also you need to consider that there is not only webdav but also
carddav, caldav and possibly other sub-protocols in the future.

Cheers,

Vincent

On 28.06.2016 13:49, Ian Macdonald wrote:

> On 28/06/16 13:40, Klaus Herberth wrote:
>> Maybe the P flag works:
>>
>> RewriteRule ^(.*)$ http://YOURHOST/remote.php/webdav/$1 [P]
>
> No, that appears to confuse the authentication process, so there is no
> authentication and I get a 403 error.
>
> Cheers,
> -Ian
>


_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Webdav as web host root?

Ian Macdonald
Hi,

That's a shame, as it would make this webDAV server migration easier. I do
think it would be useful for an ownCloud server to be able to offer
different services on different hostnames.

I'm not so worried about the ownCloud clients, as I can have people set
those up with https://owncloud.example.org as the server URL. It's only the
legacy (non-ownCloud) WebDAV clients that I was hoping could continue to
connect to webdavs://dav.example.org/ , which is the URL they are currently
using.

I was hoping some mod rewrite magic might be able to do the request URI
rewriting, but it's sounding unlikely that'll work.

Thanks,
-Ian

On 28/06/16 14:13, Vincent Petry wrote:

> Hello,
>
> I don't think this is possible.
>
> In many places, the clients and also the web UI, the URL parts
> "remote.php/webdav" are hard-coded so it will always look there.
>
> Also you need to consider that there is not only webdav but also
> carddav, caldav and possibly other sub-protocols in the future.
>
> Cheers,
>
> Vincent
>
> On 28.06.2016 13:49, Ian Macdonald wrote:
>> On 28/06/16 13:40, Klaus Herberth wrote:
>>> Maybe the P flag works:
>>>
>>> RewriteRule ^(.*)$ http://YOURHOST/remote.php/webdav/$1 [P]
>>
>> No, that appears to confuse the authentication process, so there is no
>> authentication and I get a 403 error.
>>
>> Cheers,
>> -Ian
>>
>
>
>
>
> _______________________________________________
> User mailing list
> [hidden email]
> http://mailman.owncloud.org/mailman/listinfo/user
>


--
Ian Macdonald
GreenNet, 56-64 Leonard Street, London EC2A 4LT
UK Tel:      0845 055 4011
Intl:        +44 20 7065 0935
My desk:     +44 20 3559 4011
Fax:         +44 20 7065 0936
XMPP/Jabber: [hidden email]
Registered in England & Wales, Company No. 02070438

GPG Fingerprint: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
GPG? What is this gibberish?
  https://en.wikipedia.org/wiki/Pretty_Good_Privacy
Why bother? https://philzimmermann.com/EN/essays/WhyIWrotePGP.html
Get GnuPG and secure your email!: https://www.gnupg.org
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Webdav as web host root?

tflidd
Could this work with a specific hostname which is redirected with a
proxy?

webdav-direct.example.org -> proxy ->
owncloud.example.org/remote.php/webdav

On 2016-06-28 15:53, Ian Macdonald wrote:

> Hi,
>
> That's a shame, as it would make this webDAV server migration easier. I
> do
> think it would be useful for an ownCloud server to be able to offer
> different services on different hostnames.
>
> I'm not so worried about the ownCloud clients, as I can have people set
> those up with https://owncloud.example.org as the server URL. It's only
> the
> legacy (non-ownCloud) WebDAV clients that I was hoping could continue
> to
> connect to webdavs://dav.example.org/ , which is the URL they are
> currently
> using.
>
> I was hoping some mod rewrite magic might be able to do the request URI
> rewriting, but it's sounding unlikely that'll work.
>
> Thanks,
> -Ian
>
> On 28/06/16 14:13, Vincent Petry wrote:
>> Hello,
>>
>> I don't think this is possible.
>>
>> In many places, the clients and also the web UI, the URL parts
>> "remote.php/webdav" are hard-coded so it will always look there.
>>
>> Also you need to consider that there is not only webdav but also
>> carddav, caldav and possibly other sub-protocols in the future.
>>
>> Cheers,
>>
>> Vincent
>>
>> On 28.06.2016 13:49, Ian Macdonald wrote:
>>> On 28/06/16 13:40, Klaus Herberth wrote:
>>>> Maybe the P flag works:
>>>>
>>>> RewriteRule ^(.*)$ http://YOURHOST/remote.php/webdav/$1 [P]
>>>
>>> No, that appears to confuse the authentication process, so there is
>>> no
>>> authentication and I get a 403 error.
>>>
>>> Cheers,
>>> -Ian
>>>
>>
>>
>>
>>
>> _______________________________________________
>> User mailing list
>> [hidden email]
>> http://mailman.owncloud.org/mailman/listinfo/user
>>
>
>
> --
> Ian Macdonald
> GreenNet, 56-64 Leonard Street, London EC2A 4LT
> UK Tel:      0845 055 4011
> Intl:        +44 20 7065 0935
> My desk:     +44 20 3559 4011
> Fax:         +44 20 7065 0936
> XMPP/Jabber: [hidden email]
> Registered in England & Wales, Company No. 02070438
>
> GPG Fingerprint: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
> GPG? What is this gibberish?
>   https://en.wikipedia.org/wiki/Pretty_Good_Privacy
> Why bother? https://philzimmermann.com/EN/essays/WhyIWrotePGP.html
> Get GnuPG and secure your email!: https://www.gnupg.org
> _______________________________________________
> User mailing list
> [hidden email]
> http://mailman.owncloud.org/mailman/listinfo/user
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user
Reply | Threaded
Open this post in threaded view
|

Re: Webdav as web host root?

Ian Macdonald
Hi,

On 28/06/16 16:01, tflidd wrote:
> Could this work with a specific hostname which is redirected with a proxy?
>
> webdav-direct.example.org -> proxy -> owncloud.example.org/remote.php/webdav

While mod_rewrite's proxy function didn't work, I found this page with
information about setting up Apache mod_proxy and mod_proxy_http for use
with WebDAV:
http://stackoverflow.com/questions/1110710/webdav-behind-a-reverse-proxy

In the end, this configuration worked for the proxy virtualhost:

ProxyRequests Off
<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>
ProxyPass           / https://owncloud.example.org/remote.php/webdav/
ProxyPassReverse    / https://owncloud.example.org/remote.php/webdav/
SSLProxyEngine on

...along with standard SSL and certificate config directives.

So far, that's working fine with the WebDAV clients that I've tried.

Thanks to everyone for their advice.

Best,
-Ian Macdonald

> On 2016-06-28 15:53, Ian Macdonald wrote:
>> Hi,
>>
>> That's a shame, as it would make this webDAV server migration easier. I do
>> think it would be useful for an ownCloud server to be able to offer
>> different services on different hostnames.
>>
>> I'm not so worried about the ownCloud clients, as I can have people set
>> those up with https://owncloud.example.org as the server URL. It's only the
>> legacy (non-ownCloud) WebDAV clients that I was hoping could continue to
>> connect to webdavs://dav.example.org/ , which is the URL they are currently
>> using.
>>
>> I was hoping some mod rewrite magic might be able to do the request URI
>> rewriting, but it's sounding unlikely that'll work.
>>
>> Thanks,
>> -Ian
>>
>> On 28/06/16 14:13, Vincent Petry wrote:
>>> Hello,
>>>
>>> I don't think this is possible.
>>>
>>> In many places, the clients and also the web UI, the URL parts
>>> "remote.php/webdav" are hard-coded so it will always look there.
>>>
>>> Also you need to consider that there is not only webdav but also
>>> carddav, caldav and possibly other sub-protocols in the future.
>>>
>>> Cheers,
>>>
>>> Vincent
>>>
>>> On 28.06.2016 13:49, Ian Macdonald wrote:
>>>> On 28/06/16 13:40, Klaus Herberth wrote:
>>>>> Maybe the P flag works:
>>>>>
>>>>> RewriteRule ^(.*)$ http://YOURHOST/remote.php/webdav/$1 [P]
>>>>
>>>> No, that appears to confuse the authentication process, so there is no
>>>> authentication and I get a 403 error.
>>>>
>>>> Cheers,
>>>> -Ian
>>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> User mailing list
>>> [hidden email]
>>> http://mailman.owncloud.org/mailman/listinfo/user
>>>
>>
>>
>> --
>> Ian Macdonald
>> GreenNet, 56-64 Leonard Street, London EC2A 4LT
>> UK Tel:      0845 055 4011
>> Intl:        +44 20 7065 0935
>> My desk:     +44 20 3559 4011
>> Fax:         +44 20 7065 0936
>> XMPP/Jabber: [hidden email]
>> Registered in England & Wales, Company No. 02070438
>>
>> GPG Fingerprint: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
>> GPG? What is this gibberish?
>>   https://en.wikipedia.org/wiki/Pretty_Good_Privacy
>> Why bother? https://philzimmermann.com/EN/essays/WhyIWrotePGP.html
>> Get GnuPG and secure your email!: https://www.gnupg.org
>> _______________________________________________
>> User mailing list
>> [hidden email]
>> http://mailman.owncloud.org/mailman/listinfo/user
> _______________________________________________
> User mailing list
> [hidden email]
> http://mailman.owncloud.org/mailman/listinfo/user
>


--
Ian Macdonald
GreenNet, 56-64 Leonard Street, London EC2A 4LT
UK Tel:      0845 055 4011
Intl:        +44 20 7065 0935
My desk:     +44 20 3559 4011
Fax:         +44 20 7065 0936
XMPP/Jabber: [hidden email]
Registered in England & Wales, Company No. 02070438

GPG Fingerprint: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
GPG? What is this gibberish?
  https://en.wikipedia.org/wiki/Pretty_Good_Privacy
Why bother? https://philzimmermann.com/EN/essays/WhyIWrotePGP.html
Get GnuPG and secure your email!: https://www.gnupg.org
_______________________________________________
User mailing list
[hidden email]
http://mailman.owncloud.org/mailman/listinfo/user