7 Replies Latest reply on Oct 22, 2012 11:51 PM by Jörg Hoh

    CSS from apps not rendered on Dispatcher

    Jayatl

      Hello,

       

      We've created a few components where the CSS is under the component as apps/myapps/componentname/clientlibs/css/cssname.css.  We also have most of out css/js under the etc/designs/mycompany/clientlibs.  On the Publish machines, both clientlibs appear correctly; however, through the dispatcher both references appear but all of the apps/..clientlibs are blank/inaccessible.

       

      We are using 5.5 and know /apps is blacked on the dispatcher by default, however we have enabled specific mime types as follows:

       

      # Enable specific mime types in non-public content directories 
      /0041 { /type "allow" /glob "* *.css *"   }  # enable css
      /0044 { /type "allow" /glob "* *.js *"    }  # enable javascript
      

       

      Is there something else we need to do to make this work correctly?  Using 4.1.1 dispatcher.

       

      Thanks

        • 1. Re: CSS from apps not rendered on Dispatcher
          Jörg Hoh Adobe Employee

          What do you mean with "all of the apps/..clientlibs are blank/inaccesible"? Can you give some more information like log messages and HTTP status codes?

           

          Jörg

          • 2. Re: CSS from apps not rendered on Dispatcher
            Jayatl Level 1

            Sure thing,

             

            There are no errors on Publish (it works directly from that machine) but I get a 404 via the Dispatcher.  I can see the /apps clientlibs folder when I view source/Firebug - clicking on it directly generates a 404 error.  The url it is spitting out is:

             

            <link rel="stylesheet" href="[dispatcher domain]/apps/myapps/components/mycomponent/clientlib.css" type="text/css">
            

             

            Technical, it spits out the relative path, just trying to be through with my response.  If I change the domain to the Publish server, it works:

             

            [publish domain]/apps/myapps/components/mycomponent/clientlib.css
            

             

            Let me know if you need more.

            • 3. Re: CSS from apps not rendered on Dispatcher
              Jörg Hoh Adobe Employee

              Have you restricted access to /apps before on the dispatcher/webserver?

               

              Jörg

              • 4. Re: CSS from apps not rendered on Dispatcher
                Jayatl Level 1

                Not sure what you mean by "before" - but in 5.5 /apps is restricted on the dispatcher by default.  We haven't changed that.  I was under the impression the allow globs above overrode that for *.css.

                • 5. Re: CSS from apps not rendered on Dispatcher
                  Jörg Hoh Adobe Employee

                  /apps and /libs are restricted for anonymous access, but on the CQ5 level. So, if you can access resources there when you directly to the publishing URL and you get a valid response, then you have changed that default. So, the problem must be in your dispatcher config.

                   

                  So, to further debug your problem, please increase the DispatcherLogLevel to 3 (in your httpd.conf), restart the webserver, and then redo the request. In the dispatcher log you should now find much more information, why you get a 404.

                   

                   

                  The dispatcher is not directly related to any CQ5 version, and its config is also agnostic of the CQ5 version you use.

                  • 6. Re: CSS from apps not rendered on Dispatcher
                    Jayatl Level 1

                    So it looksliek I mispoke, the resourcse is not actually reachable directly on teh Publish machine - it appeared to work because I was logged in as Admin when i was clicking the link.

                     

                    That said, is clientlibs under the apps folder no longer supported?  Shouldn't the:

                     

                    /0041 { /type "allow" /glob "* *.css *"   }  # enable css

                     

                    override and allow CSS regardless of the directory?

                    • 7. Re: CSS from apps not rendered on Dispatcher
                      Jörg Hoh Adobe Employee

                      If the publish does not deliver the file correctly, you should first fix this. So I would recommend, that you move your CSS files to /etc/design, which is not protected by default (like /apps and /libs are). Then make it work on the dispatcher.

                       

                      Jörg

                      1 person found this helpful