oupala / apaxy

a simple, customisable theme for your apache directory listing
https://oupala.github.io/apaxy/
GNU General Public License v3.0
1.86k stars 256 forks source link

Error pages stylesheets do not point to absolute paths. #122

Closed ghost closed 5 years ago

ghost commented 5 years ago

Describe the bug The custom error pages reference stylesheets, but do not point to an absolute path. This is problematic because when the page is shown from a different location than what is expected, the style sheet will simply not load.

To Reproduce Steps to reproduce the behavior:

  1. Set up Apaxy using the installation instructions
  2. Generate an error to display the error page
  3. Find that it does not load the style sheet if the error was displayed outside of the apaxy theme directory.

Expected behavior The error pages should have absolute links to the style sheets.

Client is irrelevant

Additional context None.

Notes I came across this in my quest to create an installation script. The script is just about complete, but this right here is the last thing I need to figure out.

I have actually already come up with a solution. We can use the {FOLDERNAME} placeholder, then my script can automatically replace it with the installation directory. I will create a pull request to solve this issue, as well as add my installation script and configuration. Of course, this means that the script will most likely have to be used, unless the user is comfortable with either doing the replacements manually, or using some sed, which is what I am using in my script.

oupala commented 5 years ago

You're right. I think the bug comes from the abilty to install apaxy at the root level or not. We had to use a relative path so that it works in all cases. Unfortunately, it was working wherever apaxy was installed, but only at the root level of apaxy.

We'll have {FOLDERNAME} all over the files, which will make apaxy less user friendly, and the automation script more useful for installing. There is pro and cons...