oupala/apaxy

Installscript should disable IndexOption "SuppressHTMLPreamble"

Closed this issue · 7 comments

Setting up Apaxy to style a directory, where there are already IndexOptions set in Apache's configuration file (e.g. by inhertitance), Apaxy might not be able to style the directory as intended. If the Option SuppressHTMLPreamble is set, the style sheet from Apaxy is not loaded and thus the directory index is not styled.

Steps to reproduce the behavior:

  • Edit the Directory-tag of your DocumentRoot to include
    IndexOptions +SuppressHTMLPreamble
  • Install Apaxy to a subdirectory of your DocumentRoot.
-->Your dirlisting will not get styled.


A clear and concise description of what you expected to happen.
The IndexOptions should be set in Apaxy's .htaccess file to remove: -SuppressHTMLPreamble.

Add any other context about the problem here.
The Readme.md should mention a correct AllowOverride statement for the Apaxy styled folder, which is:
AllowOverride Options Indexes FileInfo

If the option SuppressHTMLPreamble is set explicitly or by inheritance, then the documentation of apache says that it disables the behaviour of generating "a standard HTML preamble (, , et cetera)".

However, the default header of apaxy does not contain any HTML preamble.

In your case, you have a particular configuration and you then have two options to fix it:

  1. you can either edit the default header of apaxy to add any HTML preamble that you would need in order to load the stylesheet
  2. you can also edit the .htaccess file in order to disable the SuppressHTMLPreamble option that has been inherited

Apaxy is preconfigured to be installed in apache with a default configuration. If you have a specific apache configuration you'll have to adapt apaxy consequently.

If the install script added -SuppressHTMLPreamble to the generated .htaccess, would that have negative implications in your opinion? It would make apaxy work for more users out of the box.

The other thing is, completely unrelated (sorry mixing the topics): The Readme.md should mention a correct AllowOverride statement for the Apaxy styled folder, which is:
AllowOverride Options Indexes FileInfo.

For your first point, adding SuppressHTMLPreamble would "suppress HTML preamble". And as this HTML preamble is not in the default header of apaxy, it would make every page generated by Apaxy invalid.

For your second point, you're right : I will add the requirement in the README file..

Thanx for the Addition to the README.

To the other point: I always wrote -SuppressHTMLPreamble, including the minus char prefixed. I request to explicitly remove the Option, hence adding it to the .htaccess including the minus sign. The installer should in any case write the .htaccess incuding -SuppressHTMLPreamble, to avoid the Option is effect.

Until know, I did not understood the real goal of your issue. I tought you wanted to suppress the HTML preamble. You wanted in fact to prevent from suppressing the HTML preamble. I then tested your suggestion and I validated it. It is now committed in the develop branch. Please feel free to test it.

I also edited the README file in order to add the AllowOverride statement.

Thank you!

Do you plan to test the develop branch?