TransWikia.com

Apache as a Reverse Proxy in combination with Alias

Server Fault Asked by Ulf Klose on December 1, 2021

I want to build a Reverse Proxy server for several web applications running on different computers behind this Reverse Proxy. This works quite well so far.

In addition to this I want to use a local directory on the Reverse Proxy itself and share it to the web. It is a locally mounted WebDAV share with a LDAP based authentication. So I defined a Directory section in the Apache’s config file and an Alias to tell Apache which URL to use.

Everything the Apache tells me is a 404.

Here are the relevant pieces from my configuration file:

    <Directory "/home/webshareuser/owncloud">
            AuthBasicProvider ldap
            AuthType Basic
            AuthName "Webshare"
            AuthLDAPURL ldap://subdomain.domain.tld:7389/dc=domain,dc=tld?uid
            AuthLDAPBindDN uid=Administrator,cn=users,dc=domain,dc=tld
            AuthLDAPBindPassword supermegasecretpassword
            Require ldap-group cn=webshareusers,cn=groups,dc=domain,dc=tld
    </Directory>

    Alias "/webshare" "/home/webshareuser/owncloud"

Other than this there are several Proxy directives as mentioned above.

When I try to get this URL I find this in my logs (Debug log level):

[Mon Jan 18 00:08:22.129300 2016] [ssl:info] [pid 9930] [client xxx.xxx.xxx.xxx:47129] AH01964: Connection to child 7 established (server subdomain.domain.tld:443)
[Mon Jan 18 00:08:22.129575 2016] [ssl:debug] [pid 9930] ssl_engine_kernel.c(1879): [client xxx.xxx.xxx.xxx:47129] AH02043: SSL virtual host for servername subdomain.domain.tld found
[Mon Jan 18 00:08:22.129631 2016] [ssl:debug] [pid 9930] ssl_util_stapling.c(578): AH01951: stapling_cb: OCSP Stapling callback called
[Mon Jan 18 00:08:22.129641 2016] [ssl:debug] [pid 9930] ssl_util_stapling.c(586): AH01952: stapling_cb: retrieved cached certificate data
[Mon Jan 18 00:08:22.129682 2016] [socache_shmcb:debug] [pid 9930] mod_socache_shmcb.c(522): AH00835: socache_shmcb_retrieve (0x32 -> subcache 2)
[Mon Jan 18 00:08:22.129696 2016] [socache_shmcb:debug] [pid 9930] mod_socache_shmcb.c(845): AH00849: match at idx=0, data=0
[Mon Jan 18 00:08:22.129702 2016] [socache_shmcb:debug] [pid 9930] mod_socache_shmcb.c(532): AH00836: leaving socache_shmcb_retrieve successfully
[Mon Jan 18 00:08:22.129750 2016] [ssl:debug] [pid 9930] ssl_util_stapling.c(278): AH01933: stapling_get_cached_response: cache hit
[Mon Jan 18 00:08:22.129756 2016] [ssl:debug] [pid 9930] ssl_util_stapling.c(600): AH01953: stapling_cb: retrieved cached response
[Mon Jan 18 00:08:22.129849 2016] [ssl:debug] [pid 9930] ssl_util_stapling.c(644): AH01956: stapling_cb: setting response
[Mon Jan 18 00:08:22.279403 2016] [socache_shmcb:debug] [pid 9930] mod_socache_shmcb.c(485): AH00831: socache_shmcb_store (0xd9 -> subcache 25)
[Mon Jan 18 00:08:22.279482 2016] [socache_shmcb:debug] [pid 9930] mod_socache_shmcb.c(810): AH00847: insert happened at idx=0, data=(0:32)
[Mon Jan 18 00:08:22.279490 2016] [socache_shmcb:debug] [pid 9930] mod_socache_shmcb.c(815): AH00848: finished insert, subcache: idx_pos/idx_used=0/1, data_pos/data_used=0/203
[Mon Jan 18 00:08:22.279496 2016] [socache_shmcb:debug] [pid 9930] mod_socache_shmcb.c(506): AH00834: leaving socache_shmcb_store successfully
[Mon Jan 18 00:08:22.279517 2016] [ssl:debug] [pid 9930] ssl_engine_kernel.c(1812): [client xxx.xxx.xxx.xxx:47129] AH02041: Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
[Mon Jan 18 00:08:22.321987 2016] [ssl:debug] [pid 9930] ssl_engine_kernel.c(224): [client xxx.xxx.xxx.xxx:47129] AH02034: Initial (No.1) HTTPS request received for child 7 (server subdomain.domain.tld:443)
[Mon Jan 18 00:08:22.322095 2016] [authz_core:debug] [pid 9930] mod_authz_core.c(809): [client xxx.xxx.xxx.xxx:47129] AH01626: authorization result of Require all granted: granted
[Mon Jan 18 00:08:22.322105 2016] [authz_core:debug] [pid 9930] mod_authz_core.c(809): [client xxx.xxx.xxx.xxx:47129] AH01626: authorization result of <RequireAny>: granted
[Mon Jan 18 00:08:22.322164 2016] [proxy:debug] [pid 9930] mod_proxy.c(1117): [client xxx.xxx.xxx.xxx:47129] AH01143: Running scheme http handler (attempt 0)
[Mon Jan 18 00:08:22.322172 2016] [proxy_ajp:debug] [pid 9930] mod_proxy_ajp.c(713): [client xxx.xxx.xxx.xxx:47129] AH00894: declining URL http://xxx.xxx.xxx.xxx/webshare
[Mon Jan 18 00:08:22.322178 2016] [proxy_fcgi:debug] [pid 9930] mod_proxy_fcgi.c(946): [client xxx.xxx.xxx.xxx:47129] AH01076: url: http://xxx.xxx.xxx.xxx/webshare proxyname: (null) proxyport: 0
[Mon Jan 18 00:08:22.322183 2016] [proxy_fcgi:debug] [pid 9930] mod_proxy_fcgi.c(949): [client xxx.xxx.xxx.xxx:47129] AH01077: declining URL http://xxx.xxx.xxx.xxx/webshare
[Mon Jan 18 00:08:22.322190 2016] [proxy:debug] [pid 9930] proxy_util.c(2203): AH00942: HTTP: has acquired connection for (xxx.xxx.xxx.xxx)
[Mon Jan 18 00:08:22.322211 2016] [proxy:debug] [pid 9930] proxy_util.c(2256): [client xxx.xxx.xxx.xxx:47129] AH00944: connecting http://xxx.xxx.xxx.xxx/webshare to xxx.xxx.xxx.xxx:80
[Mon Jan 18 00:08:22.322390 2016] [proxy:debug] [pid 9930] proxy_util.c(2422): [client xxx.xxx.xxx.xxx:47129] AH00947: connected /webshare to xxx.xxx.xxx.xxx:80
[Mon Jan 18 00:08:22.322985 2016] [proxy:debug] [pid 9930] proxy_util.c(2798): AH02824: HTTP: connection established with xxx.xxx.xxx.xxx:80 (xxx.xxx.xxx.xxx)
[Mon Jan 18 00:08:22.323032 2016] [proxy:debug] [pid 9930] proxy_util.c(2923): AH00962: HTTP: connection complete to xxx.xxx.xxx.xxx:80 (xxx.xxx.xxx.xxx)
[Mon Jan 18 00:08:22.324486 2016] [proxy:debug] [pid 9930] proxy_util.c(2218): AH00943: http: has released connection for (xxx.xxx.xxx.xxx)
[Mon Jan 18 00:08:22.324511 2016] [headers:debug] [pid 9930] mod_headers.c(823): AH01502: headers: ap_headers_output_filter()

One Answer

The solution to my problem is the !.

ProxyPass               /webshare !

Answered by Ulf Klose on December 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP