adding SSI (server-side-include) to apache

8 posts / 0 new
Last post
#1 Wed, 01/16/2013 - 13:23
edwardsmarkf

adding SSI (server-side-include) to apache

hi all -

gotta situation where index.html loads but index.shtml gives me:

======================= Forbidden

You don't have permission to access / on this server.

i went into SystemSettings-->ServerTemplates-->Default, and selected "Apache Website" from the dropdown.

i tried changing the plus sign to a minus (please see attached) as per some earlier documentation, but that didnt seem to do it.

advice?

thank you!

Wed, 01/16/2013 - 14:55
tpnsolutions
tpnsolutions's picture

Hi,

What option did you add the minus to?

Just to clarify, adding a minus option actually disables it.

-Peter

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Wed, 01/16/2013 - 16:58
edwardsmarkf

hello tnp -

actually i just flipped a sign, and quickly flipped it back. i may not know much, but i have learned (the hard way) to make one change, note it, test it, and change it back if i dont get the desired results (and backup httpd.conf)

but my question still stands: i seem to recall some place in the world of apache where i tell apache to look for defaults such as:

index.html index.htm index.php

and i needed to add the following entry:

index.shtml

to this list.

0given how incredibly complete virtualmin is, i thought i would ask in the newbie forum first !

Wed, 01/16/2013 - 17:40 (Reply to #3)
tpnsolutions
tpnsolutions's picture

Hi,

No worries, from the Virtualmin > System Settings > Server Templates > Default Settings > Apache website page, update the Directives and settings for new websites.

In the line reading Options -Indexes... add at the end Includes

This will enable server-side includes for new domains created. You may need to update existing domains manually by going into the httpd.conf file.

Best Regards,
Peter Knowles
TPN Solutions

E: pknowles@tpnsolutions.com
P: 604-782-9342
W: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Wed, 01/16/2013 - 18:57
edwardsmarkf

ok just double-checking:

<Directory ${HOME}/public_html>
Options -Indexes -IncludesNOEXEC +FollowSymLinks
allow from all

this gets changed to:

<Directory ${HOME}/public_html>
Options -Indexes -IncludesNOEXEC +FollowSymLinks Includes
allow from all

i am trying to document every virtualmin change i make!

Wed, 01/16/2013 - 19:12
tpnsolutions
tpnsolutions's picture

Hi,

That looks good.

Best Regards,
Peter Knowles
TPN Solutions

E: pknowles@tpnsolutions.com
P: 604-782-9342
W: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Thu, 01/17/2013 - 11:37
edwardsmarkf

hmmm sadly, none of these seemed to fix it. then i remembered what i used to do in my pre-virtualmin life:

i changed this line in httpd.conf

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

to look like this:

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

and then issuing an "apachectl restart ;"

but it still feels like i am cheating virtualmin by manually editing httpd.conf

where should i have been able to set this?

thanks!

Thu, 01/17/2013 - 13:20
tpnsolutions
tpnsolutions's picture

Hi,

Yes, that part does make it "one" of the default DirectoryIndex options.

I've opened a "feature request" for this, as I understand that some people still use Server Side Includes so this could become a simple, yet valuable feature for you and others.

You can follow the "feature request" by visiting:

https://virtualmin.com/node/24982

*** I think it's safe to say that this feature will "likely" make it into an upcoming feature as outlined in my request, or in some other form. ***

Best Regards,
Peter Knowles
TPN Solutions

E: pknowles@tpnsolutions.com
P: 604-782-9342
W: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Topic locked