On Thursday, February 19, 2015 at 10:40:47 PM UTC-8, Peter Suter wrote: > > Hi > > On 19.02.2015 17:52, Emmanuel BOUAZIZ wrote: > > "There are two primary URL paths for static resources - |/chrome/common| > > and |/chrome/site|. Plugins can add their own resources, usually > > accessible by |/chrome/<plugin>| path, so its important to override only > > known paths and not try to make universal |/chrome| alias for > everything." > > > > * I suppose that if a plugin creates its own resource directory, it > > should be mapped too. A plugin like wikiextras creates 7 of these > > directories which makes a lot of aliases > > Ideally, yes. >
I would also like to try and understand this better. All of the static assets of WikiExtrasPlugin are extracted below /path/to/trac/htdocs/wikiextras, so would the following be sufficient, even though there are subdirectories in wikiextras?: Alias /trac/chrome/wikiextras /path/to/trac/htdocs/wikiextras $ find /path/to/trac/htdocs/wikiextras/ -type d /path/to/trac/htdocs/wikiextras/ /path/to/trac/htdocs/wikiextras/icons /path/to/trac/htdocs/wikiextras/icons/fugue /path/to/trac/htdocs/wikiextras/icons/fugue/icons-shadowless /path/to/trac/htdocs/wikiextras/icons/fugue/bonus /path/to/trac/htdocs/wikiextras/icons/fugue/bonus/icons-shadowless-32 /path/to/trac/htdocs/wikiextras/icons/fugue/bonus/icons-shadowless-24 /path/to/trac/htdocs/wikiextras/icons/fugue/bonus/icons-24 /path/to/trac/htdocs/wikiextras/icons/fugue/bonus/icons-32 /path/to/trac/htdocs/wikiextras/icons/fugue/icons /path/to/trac/htdocs/wikiextras/css > > > * I don't understand why "its important to override only known paths and > > not try to make universal |/chrome| alias for everything", unless you > > suspect a rogue user could create more directories in `htdocs` > > I think it just means that not necessarily all paths can be mapped the > same way, e.g. because plugins will be installed later (but not mapped > in htdocs), I think I'm missing some critical point here. Provided that all of the static resources are extracted below /path/to/trac/htdocs, for example: $ ls /path/to/trac/htdocs common newsflash tracfullblog footnote site wikiextas ... one still should not use the following alias?: Alias /trac/chrome /path/to/trac/htdocs > or maybe some plugins are installed globally and mapped to > some shared path etc. > > There's also /chrome/shared defined by the htdocs_dir option in the > inherit section of the TracIni. > > http://trac.edgewall.org/wiki/TracDev/TracURLs > > If I want to be sure that a file is being served by Apache, that would be indicated by the absence of GET requests in the log? The following message that is seen before I setup a mapping for footnote, but not after. 2015-03-21 02:06:21,372 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/chrome/footnote/footnote.css'"> Or is there another way I can check that Apache is serving the file? -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
