I moved rewrite rules inside Apache vhost config and now everything works
fine. Sorry for bothering you!

вс, 29 сент. 2019 г., 13:43 RjOllos <rjol...@gmail.com>:

>
>
> On Thursday, September 26, 2019 at 9:15:46 AM UTC-7, Viktor Chernov wrote:
>>
>>
>>
>> среда, 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.
>>
>
>
> The error message suggests that the Rewrite rule isn't matching and so
> your Trac project served at path /trac is trying to find a handler for
> "project" when you navigate to the path /trac/project.
>
>
> If you are navigating to yourhost/trac/project, I wonder if the following
> rewrite rule won't match because of the trailing forward-slash:
>
> RewriteRule ^/trac/project/$ /trac/browser/project [R]
>
> It might help to enable logging:
> https://httpd.apache.org/docs/current/mod/mod_rewrite.html#logging
>
> - Ryan
>
> --
> 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/1e7569a2-6537-458f-b225-41f2026f9461%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/1e7569a2-6537-458f-b225-41f2026f9461%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAFmQwEktmkk40iBpNpqWjpnHYU%3DBcZUgvYm08KScvuYpmjQ6hg%40mail.gmail.com.

Reply via email to