0

I have a docker-compose with many services I was able to reverse proxy behind an nginx instance, located in a linuxserver/letsencrypt docker container.

I added a shaarli container to the list, and would like to reverse proxy it too, in a subfolder, like the other services.

It almost works: I can access the site. But I have 404 errors when the browser tries to access JS and CSS files of the site.

Here is the nginx configuration I currently have:

server {
        listen 80;
        server_name _;
        return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2 default_server;

    root /config/www;
    index index.html index.htm index.php;

    server_name _;

    include /config/nginx/proxy-confs/*.subfolder.conf;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location /radarr
    {
        proxy_pass  http://192.168.0.1:7878;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    # etc...

    location /shaarli
    {
        proxy_pass  http://192.168.0.1:8070;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Proto $scheme;
        proxy_set_header  X-Forwarded-Host  $host;
    }
}

Any idea of what I should change to make it able to resolve access to internal resources?

  • Hey, can you share some of the URLs doing a 404? Did you have a look at github.com/shaarli/Shaarli/blob/master/doc/md/… – Oct Nov 29 '18 at 15:47
  • Hello, yes, I had a look at the documentation, and this is where I got that config. One of the file which generates a 404 is: <link type="text/css" rel="stylesheet" href="tpl/default/./css/shaarli.min.css" /> – Emidee Nov 29 '18 at 17:44
  • Could be this: github.com/shaarli/Shaarli/issues/1244 ? – Oct Nov 29 '18 at 20:43
  • Yes it is, I did post that issue :) – Emidee Nov 30 '18 at 10:31
  • The issue is not solved, but I got some feedback on the github issue link and in the end, I made the shaarli app available as a sub domain... – Emidee Dec 3 '18 at 17:50

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.