Need help: Exclude subfolder path from Rewrite

Hi there,

I tried a lot of things already, but I don’t get it running. So I just ask here, perhaps somebody can help me.

My configuration is the following:

  • I installed the NextcloudPi SD card image and everything is running very well.
  • Then I installed Docker and installed an ebook library image/container which I can access via the configured port. And again, everything is working wonderfully.

Now, I would like to access the ebook library docker container via mycloud.url/library, but I’m having problems to configure the Apache Reverse Proxy right.
I tested copying

ProxyPass /library http://127.0.0.1:8080/library
ProxyPassReverse /library http://127.0.0.1:8080/library

into the nextcloud.conf and into a new conf file and the configuration from here (airsonic docker documentation), but when I try to load mycloud.url/library in my browser, I’m always redirected to the Nextcloud login screen.

I already consulted the Apache Documentation, Documentations to other docker images etc.

Does somebody of you got an idea how to do this correctly? I just don’t get any further.
Any help would be great!

Best regards :smile:

okay, I did some testing and I found out, that I need to reconfigure the .htaccess and/or the apache rewrite configuration.

I tried to exclude my subfolder from the rewrite engine by adding

RewriteCond %{REQUEST_URI} !^.*/library/.*$ [NC]

or

RewriteRule ^(library|somethingelse)($|/) - [L]

or

RewriteRule !^library($|/) http://example.com%{REQUEST_URI} [L,R=301]

into the .htaccess file or the nextcloud.conf but nothing changed

:frowning:

Does somebody have an idea how to exclude my path “/library” from the Nextcloud Rewrite Engine? Nextcloud is accessable via mycloud.com