This is a discussion on SSI within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm a novice with Apache administration. I've spent the last six hours trying to enable SSI. I'm ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm a novice with Apache administration. I've spent the last six hours
trying to enable SSI. I'm building a site which will be hosted on a remote server. To duplicate these conditions on my test server, I'm enabling SSI through an .htaccess file instead of the httpd.config file. But first, I need to enable the httpd.config file to recognize ..htaccess files. The httpd.config file starts like this: <Directory "/www/webroot"> Order allow,deny AllowOverride none Allow from all </Directory> When I change it to this: <Directory "/www/webroot"> Order allow,deny AllowOverride Options Allow from all </Directory> it stops working. My understanding was that if I did this, then created a file named .htaccess in the /www/webroot directory which said: Options +Includes AddType text/html .shtml AddOutputFilter INCLUDES .shtml --that I would enable SSI for all files with the .shtml extension in my webroot. However, when I restart the server and reload my page, I receive an "Internal Server Error." I am doing something wrong? (If it helps any, the only other set of <Directory> tags with a wider scope looks like this: <Directory /> Options None AllowOverride None Order allow,deny Deny from all </Directory> ) |
|
|||
|
EverettLindsay@gmail.com wrote:
> But first, I need to enable the httpd.config file to recognize > ..htaccess files. The httpd.config file starts like this: > > <Directory "/www/webroot"> > Order allow,deny > AllowOverride none > Allow from all > </Directory> > > When I change it to this: > > <Directory "/www/webroot"> > Order allow,deny > AllowOverride Options > Allow from all > </Directory> You must also set FileInfo to the AllowOverride directive to use AddType and AddOutputFilter in a .htaccess file: AllowOverride Options FileInfo > it stops working. My understanding was that if I did this, then > created a file named .htaccess in the /www/webroot directory which > said: > > Options +Includes > > AddType text/html .shtml > AddOutputFilter INCLUDES .shtml Why don't you add this inside your <Directory "/www/webroot">-Container and leave AllowOverride None? This wold be better in the aspect of performance issues. <Directory "/www/webroot"> Order allow,deny Options +Includes AddType text/html .shtml AddOutputFilter INCLUDES .shtml </Directory> > --that I would enable SSI for all files with the .shtml extension in my > webroot. However, when I restart the server and reload my page, I > receive an "Internal Server Error." I think it's from the missing AllowOverride FileInfo. |
|
|||
|
Son of a gun, that did it!
THANK you! > Why don't you add this inside your <Directory "/www/webroot">-Container > and leave AllowOverride None? This wold be better in the aspect of > performance issues. Well, it's like I said before, >> I'm building a site which will be hosted on a >> remote server. To duplicate these conditions on my test server, I'm >> enabling SSI through an .htaccess file instead of the httpd.config >> file. I've checked with the hosting company, and while they will not allow me to dictate changes to the httpd.config file, they do allow the use of ..htaccess. --E. |