среда, 25 сентября 2019 г., 20:14:26 UTC+3 пользователь RjOllos написал:
>
>
>
> On Wednesday, September 25, 2019 at 9:59:52 AM UTC-7, RjOllos wrote:
>>
>>
>>
>> On Wednesday, September 25, 2019 at 8:53:09 AM UTC-7, Viktor Chernov 
>> wrote:
>>>
>>> Hi! 
>>>
>>> I need help with URL redirects for Trac with WSGI script. I have httpd 
>>> server behind AWS ALB. I'm terminating SSL on ALB side and then response 
>>> goes to httpd on port 80.
>>> We recently migrated from Trac 0.12 to 1.2.4 and faced with changed URL 
>>> addresses.
>>>
>>
>> The URLs would not have changed due to the upgrade. Did they change for 
>> some other reason?
>>  
>>
>>> And for backward compatibility, we are trying to rewrite responses 
>>> from  ^/trac/project$  to /trac/browser/project. But for some reason, 
>>> it doesn't work.
>>>
>>> I always get the same error:
>>> 2019-09-25 04:07:22,061 Trac[main] WARNING: HTTPNotFound: 404 Not Found 
>>> (No handler matched request to /project), <RequestWithSession "GET 
>>> '/project'">, referrer None
>>>
>>
>>
>> Is the project/environment name "trac" or "project"? Usually, the Trac 
>> project/environments is the path in the URL, so it would usually be either 
>> /trac or /project.
>>
>> - Ryan
>>
>
> I see in your configuration, you project/env name is "project".
>
> It looks like you have a single project configuration and your 
> configuration makes your site reachable at path /trac. When you append 
> /project to /trac, the server thinks /project is the realm/handler. For 
> example, a typical path would be /trac/wiki/WikiStart, not 
> /trac/project/wiki/WikiStart.
>
> If you have multiple projects, then the situation is different, but I 
> think your configuration has to change in that case.
>
> I don't understand the rewrite rule you are trying to implement. The 
> repository name can be the trailing part of the path in a multi-repository 
> setup, but the project name should not be at the end of the path.
>
> - Ryan
>

Hi! Looks like I missed to tell some major moments.

Basically we are using Trac to keep track of SVN repo changesets. 
On Trac 0.12 we had 4 different projects. Each project had own Postgres 
database and own attached SVN repo.

Since new Trac has multi-repository support we decided to have only one 
Trac project, one Postgres DB and 4 SVN repo attached to one project.
So 'project' equal to `SVN repo name`. And we are trying to save backward 
compatibility, of old links that we had for SVN repo (/trac/repo1) and 
redirect them to a new (/trac/browser/repo1). Same with changesets.

-- 
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 trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/3845bed1-0efb-4d3e-b7cd-41be7b482409%40googlegroups.com.

Reply via email to