Trac-1.6 htdocs_location with mod_python

16 views
Skip to first unread message

Sandro Santilli

unread,
Sep 10, 2024, 10:39:01 AMSep 10
to trac-...@googlegroups.com
I've tried setting trac.htdocs_location in trac.ini but I don't
see it ever used, how could I possibly debug this issue ?

It's Trac-1.6 served by mod_python
The env trac.ini also sets base_url if that's possibly related.

Please include my address whey replying as I'm not always reading the list.

--strk;

Libre GIS consultant/developer
https://strk.kbt.io/services.html
signature.asc

Jun Omae

unread,
Sep 10, 2024, 5:21:49 PMSep 10
to trac-...@googlegroups.com, st...@kbt.io
Please explain "not used" and points which you've confirmed.

At least, it works on my test environment.

1. Set the option in trac.ini:
[trac]
htdocs_location = //assets.example.org/htdocs/

2. Send request to top page using "curl -s http://.../trac"
The value "//assets.example.org/htdocs/" is used in rendered html like the following:

[[[
...
<link rel="stylesheet" href="//assets.example.org/htdocs/css/trac.css" type="text/css" />
<link rel="stylesheet" href="//assets.example.org/htdocs/css/wiki.css" type="text/css" />
...
<script src="//assets.example.org/htdocs/js/jquery.js"></script>
<script src="//assets.example.org/htdocs/js/babel.js"></script>
<script src="//assets.example.org/htdocs/js/trac.js"></script>
<script src="//assets.example.org/htdocs/js/search.js"></script>
<script src="//assets.example.org/htdocs/js/folding.js"></script>
<script src="//assets.example.org/htdocs/js/wiki.js"></script>
...
]]]

--
Jun Omae <jun...@gmail.com> (大前 潤)

Sandro Santilli

unread,
Sep 11, 2024, 4:21:48 AMSep 11
to Jun Omae, trac-...@googlegroups.com
On Wed, Sep 11, 2024 at 06:21:36AM +0900, Jun Omae wrote:
> On 2024/09/10 23:38, Sandro Santilli wrote:
> > I've tried setting trac.htdocs_location in trac.ini but I don't
> > see it ever used, how could I possibly debug this issue ?
> >
> > It's Trac-1.6 served by mod_python
> > The env trac.ini also sets base_url if that's possibly related.
> >
> > Please include my address whey replying as I'm not always reading the list.
>
> Please explain "not used" and points which you've confirmed.

Ok I found the problem:

trac.ini inherits trac-common.ini

The htdocs_location set in trac-common.ini has no effect because
trac.ini has it set to the empty string, overriding the one in
trac-common.ini

--strk;


signature.asc
Reply all
Reply to author
Forward
0 new messages