index.shtml and #include virtual in Virtualmin

For some reason the default virtualmin install does not have index.shtml in the Directoryindex directive. To enable it, one must edit the directive:

Virtualmin > Services > Configure Website > Edit Directives 

Find the following line:

DirectoryIndex index.html index.htm index.php index.php4 index.php5

Add index.shml at the end  of the line:

DirectoryIndex index.html index.htm index.php index.php4 index.php5 index.shtml

Click “Save” then “Apply Changes” (on the top right hand side of the “Virtual Server Options” page). Checking your virtual website will show the index.shtml page.

To make it a default configuration

In order to enable  this for all further virtual websites:

Virtualmin > System Settings > Server Templates > Default Settings > Apache website > Directives and settings for new websites

Find the following line:

DirectoryIndex index.html index.htm index.php index.php4 index.php5

Add index.shml at the end  of the line:

DirectoryIndex index.html index.htm index.php index.php4 index.php5 index.shtml

Click “Save”

The same can be applied in the “Settings For Sub-Servers” Template.

#include virtual

I have some cgi scripts that are included in my shtml files. to enable include executions in the default virtualmin setup. some changes must be made in the same files as above:

Find:

Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch

and replace with (remove NOEXEC):

Options -Indexes +Includes +SymLinksIfOwnerMatch

Retarting the Apache server will enable #include virtual=”/cgi-bin/somescript.cgi” directive.

One thought on “index.shtml and #include virtual in Virtualmin”

Comments are closed.