NGINX/reverse proxy, WebDAV @apache2, functional, except no fancy icons [SOLVED]

Please use this template for troubleshooting questions.

My issue:

Hello at all, as i described above, i could configure succesfull this:

→ Internet/dynname debian/raspian Raspbian, GNU/Linux 10 with LE-Cert →
→ nginx/1.14.2 as reverse proxy (rp)
→ forwarding https on dynname above →
→ proxy_pass h_ttp://localhost:82/webdav; # restrictions for new user, two links
→ on port 82 is an Apache/2.4.59 (Raspbian)

All, really all is fine, i can do mv/cp/del files/dirs on apache2 with nemo (davs://[dynname]/webdav)/winscp etc.; also login (apache2) with passwort (Basic or Digest).

How I encountered the problem:

If i connect to this machine internal h_ttp://192.168.XX.YY:82/webdav (!https) all is fine, i do get also the fancy icons on the left, nice. Mission accomplished, fully functional webdav-srv, 99/100 ACK, except missing one point, cause,

… if i get connected to this machine through his dynname (https), there is no fancy icons on the left site. I get instead of only (ASCII) [DIR] od [PARENTDIR]. All actions described above are further possible; cp/mv/del etc.

I am NOT_ a guru in nginx and therefore i was stealing :slight_smile: some config parts for rp for webdav on nginx. I tried webdav on nginx, but no cp/mv/del etc, some minor/major problems, then i switched to apache2.

Here

i found very, very usefull information.

The browser devtools list 404-Error for missing icons. Cause it is not possible to see the fancy icons through nginx-rp, the prolem is/should be @nginx(?):

Solutions I’ve tried:
a lot of Proxy headers set@nginxings in nginx*conf none of them was succesfull.

Version of NGINX or NGINX adjacent software (e.g. NGINX Gateway Fabric):

nginx/1.14.2 as reverse proxy (rp)

Deployment environment:

debian/raspian Raspbian, GNU/Linux 10 with LE-Cert

Minimal NGINX config to reproduce your issue (preferably running on https://tech-playground.com/playgrounds/nginx for ease of debugging, and if not as a code block): (Tip → Run nginx -T to print your entire NGINX config to your terminal.)

location /webdav {
set $dest $http_destination;
if ($http_destination ~ “^https://(?(.+))”) {
set $dest h_t_t_p://$myvar; # http is in the config, cause of new users could only use two links. :frowning:
}
proxy_set_header Destination $dest;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
autoindex on;
fancyindex on;
fancyindex_localtime on;
fancyindex_exact_size off;
charset utf-8;
proxy_http_version 1.1;
proxy_set_header “Connection” “”;
proxy_buffer_size 16k;
proxy_buffers 32 8k;
proxy_busy_buffers_size 64k;
proxy_pass h_ttp://localhost:82/webdav; # http restriction for new user, two links
proxy_buffering off;
}

NGINX access/error log: (Tip → You can usually find the logs in the /var/log/nginx directory.)


access.log
92.116.X.Y - [USERNAME] [22/Aug/2025:00:37:14 +0200] “GET /icons/back.gif HTTP/2.0” 404 132 “h_ttps://XXXX.ipv64.net/webdav/” " Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0"

92.116.X.Y - [USERNAME] [22/Aug/2025:00:37:14 +0200] “GET /icons/folder.gif HTTP/2.0” 404 132 “h_ttps://XXXX.ipv64.net/webdav/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0”

92.116.X.Y - [USERNAME] [22/Aug/2025:00:37:14 +0200] “GET /icons/back.gif HTTP/2.0” 404 132 “h_ttps://XXXX.ipv64.net/webdav/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0”

92.116.X.Y - [USERNAME] [22/Aug/2025:00:37:14 +0200] “GET /icons/folder.gif HTTP/2.0” 404 132 “h_ttps://XXXX.ipv64.net/webdav/” “Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0”


net.error.log - 0 byte, no errors in this file.


Thx in advance

ELindemann

Hey @ELindemann!

If I am reading your post correctly, the issue seems to be that some CSS/JS is missing when you proxy to your backend, right? There are many potential reasons for this, but it’s usually not an issue with the proxy configuration itself. A quick Google search shows many examples for other platforms where something had to be enabled on the proxied platform instead of NGINX, but I cannot find anything about WebDAV.

Sadly, I am not familiar with WebDAV myself so I can’t offer much help, but the one thing I would suggest is updating your NGINX version – it’s over 7 years old at this point! Hopefully someone else in the forum has other suggestions! :slightly_smiling_face:

Hey alesssandro,

thx for your hint, i always was thinking it could be only on my rp/nginx, not at proxied system. A new way/hint to search a solution.

I know, it is an old platform. As you saw deb10 on raspi 3b. I set it up to get some exprience with raspi-hw, and it was really fine. Because did well, i put some other functions on this system.

thx

ELindemann

1 Like

A quick and drity way solution, as always :wink: :

this setup will/does function, except no fancy icons in browser only. To GUI Probs by winscp/Explorer/nemo etc.

I found this Add-on for FireFox (FF).

or search in FF/Add-ons fort webdav, install Webdav Browser by Sergey Ponomarev. It really does all things what you need in FF-browser connected with webdav.

Here is a minor addition for uploading bigger files then 1M. If you do not have this addition (default config will not have it), you will get by files > 1M

413 Request Entity Too Large

Error message by nginx, not by apache2.

client_max_body_size 10M;

How do i close this topic?

ELindemann

I’ve marked your solution as the solution! It will automatically close in 7 days :slightly_smiling_face:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.