appserver icon indicating copy to clipboard operation
appserver copied to clipboard

[appserver-io/webserver] problem setting directoryIndex in virtual-hosts.xml

Open al-Obaidi opened this issue 9 years ago • 0 comments

Setting directoryIndex in conf.d/virtual-hosts.xml doesn't work. For example, if I want to set "x.pdf" as a directoryIndex, this supposed setting will not work:

conf.d/virtual-hosts.xml

<params>
    <param name="documentRoot" type="string">/opt/appserver/webapps/example_com</param>
    <param name="directoryIndex" type="string">x.pdf</param>
</params>

As a temproray solution, "x.pdf" should be added to appserver.xml as follow

<server
name="http"
<params>
<param name="directoryIndex" type="string">index.dhtml index.do index.php index.html index.htm x.pdf</param>

But this will make "x.pdf" is a directoryIndex for the whole server not to a specific virtual-host.

Test on CentOS Linux release 7.3.1611

al-Obaidi avatar Aug 25 '17 17:08 al-Obaidi