Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Reverse proxy: CSS not loading?

    Duet Hardware and wiring
    4
    6
    827
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Nxt-1
      Nxt-1 last edited by

      I am currently experimenting with making the DWC accessible from outside my LAN. The setup currently working like this:

      • Dyndns configuration to translate to my public network address.
      • Portforward from port 5080 to my_pc's_networkaddress:5080.
      • Windows (10) firewall rule to accept TCP connections for a specific program (Apache)
      • An Apache webserver listening on port 5080 with a reverse proxy to "http://my_printer's_networkaddress/"

      I can acces the DWC just fine but none of the css styling seems to load. Any advice on how to fix this is much appreciated. (From what I can Google, I think the issue is related to handeling relative url's.)

      1 Reply Last reply Reply Quote 0
      • Nxt-1
        Nxt-1 last edited by

        Bump, anyone?

        1 Reply Last reply Reply Quote 0
        • dc42
          dc42 administrators last edited by

          The reprap.htm file includes these lines. Near the start:

          <link href="css/dwc.css" rel="stylesheet">

          Near the end:

          <script src="js/dwc.js"></script>

          So you could try editing that file, putting a leading "/" at the start of each path.

          HTH David

          1 Reply Last reply Reply Quote 0
          • resam
            resam last edited by resam

            I'm running an nginx reverse proxy - without editing DWC files.
            I think you can play with adding a final / to your Apache ProxyPass config.

            edit:
            This is my nginx snippet:

                            location /my_printer/dwc/ {
                                    proxy_pass http://10.0.0.42/;
                            }
            
            Nxt-1 1 Reply Last reply Reply Quote 0
            • Nxt-1
              Nxt-1 @resam last edited by

              @resam said in Reverse proxy: CSS not loading?:

              I'm running an nginx reverse proxy - without editing DWC files.
              I think you can play with adding a final / to your Apache ProxyPass config.

              edit:
              This is my nginx snippet:

                              location /my_printer/dwc/ {
                                      proxy_pass http://10.0.0.42/;
                              }
              

              That did it, thank you very much.

              1 Reply Last reply Reply Quote 0
              • wilriker
                wilriker Moderator last edited by

                Interesting. I also run a reverse proxy with nginx but I do not need this trailing slash - but it may be due to me using a subdomain.

                Therefore my relevant part looks like

                server {
                    [...]
                    server_name duet.<domain>;
                    location / {
                        proxy_pass http://192.168.3.4;
                        [...]
                    }
                }
                
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA