Skip to content

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

@al-Obaidi

Description

@al-Obaidi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions