Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Path of "themes/*" start from webroot instead of the VirtualHost's "Alias" directory location #28

Closed
PABourdin opened this issue Aug 16, 2017 · 6 comments

Comments

@PABourdin
Copy link

PABourdin commented Aug 16, 2017

Hello,
this is likely a bug in Silex: I have built and installed our master from 3ad4f03 and have it configured on one of my VirtualHosts using an "Alias" directive, here Alias /gitlist-dev/ /var/www/gitlist-dev/. I did the same with the original version klaussilveira/gitlist but have it instead under Alias /gitlist/ /var/www/gitlist/. Both work in principle, but from our version I see a lot of such GET requests that must of course fail:

IP - [DATETIME] "GET /themes/default/css/style.css HTTP/1.1" 404
IP - [DATETIME] "GET /themes/default/css/gitgraph.css HTTP/1.1" 404

The original version (of course) works fine:

IP - [DATETIME] "GET /gitlist/themes/default/css/style.css HTTP/1.1" 300
IP - [DATETIME] "GET /gitlist/themes/default/css/gitgraph.css HTTP/1.1" 300

We see that obviously the URL for the themes is constructed in a wrong manner in our master.
Both VirtualHosts have the identical configuration, except for the location of their directory.
Anyone has hints?

@PABourdin
Copy link
Author

PS: The RewriteRule and RewriteBase is not the issue, because I see it is working for both installations on "index.php".

@PABourdin
Copy link
Author

Even though the issue discussed here is probably unrelated, the given answers might be relevant:
https://stackoverflow.com/questions/30034105/htaccess-for-silex

@PABourdin
Copy link
Author

PABourdin commented Aug 18, 2017

I can't find any places, where our application would create the failing requests to /themes/, so I assume this is a bug in Silex or Symfony. Any other opinions?

@PABourdin PABourdin added the bug label Aug 18, 2017
@PABourdin
Copy link
Author

PABourdin commented Aug 18, 2017

Someone else had a similar issue with phpmyadmin while using Symfony:
symfony/symfony#23236
Seems there was a problem in the generation of the request URLs inside the application.

@DannyvdSluijs
Copy link

A BC break with upgrading to Silex 2.x was overlooked. This has been applied in #36
The initial commit was based on my previous commit which included additional unit testing.
Removed the branch (bug-28) and recreated it from the current HEAD.

@PABourdin
Copy link
Author

@DannyvdSluijs great you found and fixed this! Seems I had looked only in src/ and not in the themes/ directory... I really appreciate the help. :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants