|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I want to get SS includes going on my Apache 2.x but I seem to be missing
something. I have <Directory "/home/web/blah/blah"> Options +Includes AddOutputFilter INCLUDES .shtml AddType text/html .shtml AddHandler server-parsed .shtml </Directory> I have tried without the + on Includes. I have tried these directives in the vhost section. I can't get the files parsed. I have a test file <html> <head> <TITLE> Test of SSI </TITLE> </head> <body> <center> <h1><!--#config errmsg="mod_include is unable to parse your code!"--> Today is <!--#echo var="DATE_LOCAL"--> <!--#config timefmt="%B %d, %y"--> <!--#include file="include_bttm.html--> <!--#include file="/home/web/blah/include_bttm.html> </center> </body> </html> and only get "Today is" in the browsers. Nothing in the error log and access log shows the GET!?? What am I missing?? Thanks. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Feb 6, 6:18 am, "wiggledbits" <abigdipst...@gmail.com> wrote:
> I want to get SS includes going on my Apache 2.x but I seem to be missing > something. > > I have > <Directory "/home/web/blah/blah"> > Options +Includes > AddOutputFilter INCLUDES .shtml > AddType text/html .shtml > AddHandler server-parsed .shtml > </Directory> > > I have tried without the + on Includes. > I have tried these directives in the vhost section. > I can't get the files parsed. I have a test file > <html> > <head> > <TITLE> Test of SSI </TITLE> > </head> > <body> > <center> > <h1><!--#config errmsg="mod_include is unable to parse your code!"--> > Today is <!--#echo var="DATE_LOCAL"--> > <!--#config timefmt="%B %d, %y"--> > <!--#include file="include_bttm.html--> > <!--#include file="/home/web/blah/include_bttm.html> > </center> > </body> > </html> > and only get "Today is" in the browsers. > Nothing in the error log and access log shows the GET!?? > What am I missing?? > Thanks. well there are few typos there: try this instead: <html> <head> <TITLE> Test of SSI </TITLE> </head> <body> <center> <h1> <!--#config errmsg="mod_include is unable to parse your code!"--> <!--#config timefmt="%B %d, %Y" --> Today is <!--#echo var="DATE_LOCAL" --> <!--#include file="include_1.html" --> <!--#include virtual="/ssi/include_2.html" --> </center> </body> </html> you didnt say which OS youre on, do you have the required x bit set? If not it should work provided the path given in your <Directory "/ path"> is ok. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Just got it going. Yes there were some typos and I got more info from some
other links. Thanks again. Oh and it was Centos 4.4. "shimmyshack" <matt.farey@gmail.com> wrote in message news:1170744621.101413.6640@q2g2000cwa.googlegroup s.com... > On Feb 6, 6:18 am, "wiggledbits" <abigdipst...@gmail.com> wrote: >> I want to get SS includes going on my Apache 2.x but I seem to be missing >> something. >> >> I have >> <Directory "/home/web/blah/blah"> >> Options +Includes >> AddOutputFilter INCLUDES .shtml >> AddType text/html .shtml >> AddHandler server-parsed .shtml >> </Directory> >> >> I have tried without the + on Includes. >> I have tried these directives in the vhost section. >> I can't get the files parsed. I have a test file >> <html> >> <head> >> <TITLE> Test of SSI </TITLE> >> </head> >> <body> >> <center> >> <h1><!--#config errmsg="mod_include is unable to parse your code!"--> >> Today is <!--#echo var="DATE_LOCAL"--> >> <!--#config timefmt="%B %d, %y"--> >> <!--#include file="include_bttm.html--> >> <!--#include file="/home/web/blah/include_bttm.html> >> </center> >> </body> >> </html> >> and only get "Today is" in the browsers. >> Nothing in the error log and access log shows the GET!?? >> What am I missing?? >> Thanks. > > > > well there are few typos there: try this instead: > > <html> > <head> > <TITLE> Test of SSI </TITLE> > </head> > <body> > <center> > <h1> > > <!--#config errmsg="mod_include is unable to parse your code!"--> > > <!--#config timefmt="%B %d, %Y" --> > Today is <!--#echo var="DATE_LOCAL" --> > > <!--#include file="include_1.html" --> > > <!--#include virtual="/ssi/include_2.html" --> > </center> > </body> > </html> > > you didnt say which OS youre on, do you have the required x bit set? > If not it should work provided the path given in your <Directory "/ > path"> is ok. > |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
OK just to make sure I have this correct...
I have in my httpd.conf file # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # AddType text/html .shtml AddOutputFilter INCLUDES .shtml .. .. .. # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#options # for more information. # Options Indexes FollowSymLinks Options Includes in an .htacess file in the root of the site I have AddType text/html .shtml AddHandler server-parsed .shtml Options Indexes FollowSymLinks Includes Although if I change the date format in the shtml file it doesn't change in the output the rest appears to test ok. I think I have it all now. Any corrections needed? "wiggledbits" <abigdipstick@gmail.com> wrote in message news:12sgc7efcoij27c@corp.supernews.com... > Just got it going. Yes there were some typos and I got more info from some > other links. > Thanks again. > Oh and it was Centos 4.4. > > "shimmyshack" <matt.farey@gmail.com> wrote in message > news:1170744621.101413.6640@q2g2000cwa.googlegroup s.com... >> On Feb 6, 6:18 am, "wiggledbits" <abigdipst...@gmail.com> wrote: >>> I want to get SS includes going on my Apache 2.x but I seem to be >>> missing >>> something. >>> >>> I have >>> <Directory "/home/web/blah/blah"> >>> Options +Includes >>> AddOutputFilter INCLUDES .shtml >>> AddType text/html .shtml >>> AddHandler server-parsed .shtml >>> </Directory> >>> >>> I have tried without the + on Includes. >>> I have tried these directives in the vhost section. >>> I can't get the files parsed. I have a test file >>> <html> >>> <head> >>> <TITLE> Test of SSI </TITLE> >>> </head> >>> <body> >>> <center> >>> <h1><!--#config errmsg="mod_include is unable to parse your code!"--> >>> Today is <!--#echo var="DATE_LOCAL"--> >>> <!--#config timefmt="%B %d, %y"--> >>> <!--#include file="include_bttm.html--> >>> <!--#include file="/home/web/blah/include_bttm.html> >>> </center> >>> </body> >>> </html> >>> and only get "Today is" in the browsers. >>> Nothing in the error log and access log shows the GET!?? >>> What am I missing?? >>> Thanks. >> >> >> >> well there are few typos there: try this instead: >> >> <html> >> <head> >> <TITLE> Test of SSI </TITLE> >> </head> >> <body> >> <center> >> <h1> >> >> <!--#config errmsg="mod_include is unable to parse your code!"--> >> >> <!--#config timefmt="%B %d, %Y" --> >> Today is <!--#echo var="DATE_LOCAL" --> >> >> <!--#include file="include_1.html" --> >> >> <!--#include virtual="/ssi/include_2.html" --> >> </center> >> </body> >> </html> >> >> you didnt say which OS youre on, do you have the required x bit set? >> If not it should work provided the path given in your <Directory "/ >> path"> is ok. >> > > |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On 6 Feb, 08:30, "wiggledbits" <abigdipst...@gmail.com> wrote:
> OK just to make sure I have this correct... > I have in my httpd.conf file > # To parse .shtml files for server-side includes (SSI): > # (You will also need to add "Includes" to the "Options" directive.) > # > AddType text/html .shtml > AddOutputFilter INCLUDES .shtml > . > . > . > # The Options directive is both complicated and important. Please see > #http://httpd.apache.org/docs-2.0/mod/core.html#options > # for more information. > # > Options Indexes FollowSymLinks > Options Includes > > in an .htacess file in the root of the site I have > AddType text/html .shtml > AddHandler server-parsed .shtml > Options Indexes FollowSymLinks Includes > > Although if I change the date format in the shtml file it doesn't change in > the output the rest appears to test ok. > I think I have it all now. Any corrections needed? > > "wiggledbits" <abigdipst...@gmail.com> wrote in message > > news:12sgc7efcoij27c@corp.supernews.com... > > > Just got it going. Yes there were some typos and I got more info from some > > other links. > > Thanks again. > > Oh and it was Centos 4.4. > > > "shimmyshack" <matt.fa...@gmail.com> wrote in message > >news:1170744621.101413.6640@q2g2000cwa.googlegrou ps.com... > >> On Feb 6, 6:18 am, "wiggledbits" <abigdipst...@gmail.com> wrote: > >>> I want to get SS includes going on my Apache 2.x but I seem to be > >>> missing > >>> something. > > >>> I have > >>> <Directory "/home/web/blah/blah"> > >>> Options +Includes > >>> AddOutputFilter INCLUDES .shtml > >>> AddType text/html .shtml > >>> AddHandler server-parsed .shtml > >>> </Directory> > > >>> I have tried without the + on Includes. > >>> I have tried these directives in the vhost section. > >>> I can't get the files parsed. I have a test file > >>> <html> > >>> <head> > >>> <TITLE> Test of SSI </TITLE> > >>> </head> > >>> <body> > >>> <center> > >>> <h1><!--#config errmsg="mod_include is unable to parse your code!"--> > >>> Today is <!--#echo var="DATE_LOCAL"--> > >>> <!--#config timefmt="%B %d, %y"--> > >>> <!--#include file="include_bttm.html--> > >>> <!--#include file="/home/web/blah/include_bttm.html> > >>> </center> > >>> </body> > >>> </html> > >>> and only get "Today is" in the browsers. > >>> Nothing in the error log and access log shows the GET!?? > >>> What am I missing?? > >>> Thanks. > > >> well there are few typos there: try this instead: > > >> <html> > >> <head> > >> <TITLE> Test of SSI </TITLE> > >> </head> > >> <body> > >> <center> > >> <h1> > > >> <!--#config errmsg="mod_include is unable to parse your code!"--> > > >> <!--#config timefmt="%B %d, %Y" --> > >> Today is <!--#echo var="DATE_LOCAL" --> > > >> <!--#include file="include_1.html" --> > > >> <!--#include virtual="/ssi/include_2.html" --> > >> </center> > >> </body> > >> </html> > > >> you didnt say which OS youre on, do you have the required x bit set? > >> If not it should work provided the path given in your <Directory "/ > >> path"> is ok. you shouldnt need the config in an htaccess file as well as the conf, it all depends how secure you want to be, for just a couple of SSIs I would turn off htaccess altogether (in fact never use it if you have httpd.conf control) use a <Directory "path/to/where/you/need/SSIs"> Options +Includes AddHandler server-parsed .shtml AddOutputFilter INCLUDES .shtml </Directory> That should be enough, the + in front of Includes is here in my setup because I have Includes off globally. (in other words for the server document root and up includes indexes etc.. is off, and i turn it on per directory the + overrides the global setting) SSIs are a bad thing in general in my opinion as you dont get enough control of what they spew out unless you start including the output from programs, be careful of being too loose with permissions SSIs can be used to execute processes on the server with server permissions. The time thing is funny, I couldnt get it to control the format either, although I went to the docs to copy and paste. Not sure why, perhaps an expert can say! (2.2.4/XP_PRO briefly ) |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
My use of the directives was mostly for testing. My intent is to use ssi for
some header and footer includes. I do not plan on implementing the XBitHack. I was thinking I should be able to add the content of the .htaccess file into the vhost config section. I prefer to have this allowed only where it is used. Thanks. "shimmyshack" <matt.farey@gmail.com> wrote in message news:1170752314.344288.187030@j27g2000cwj.googlegr oups.com... > On 6 Feb, 08:30, "wiggledbits" <abigdipst...@gmail.com> wrote: >> OK just to make sure I have this correct... >> I have in my httpd.conf file >> # To parse .shtml files for server-side includes (SSI): >> # (You will also need to add "Includes" to the "Options" directive.) >> # >> AddType text/html .shtml >> AddOutputFilter INCLUDES .shtml >> . >> . >> . >> # The Options directive is both complicated and important. Please see >> #http://httpd.apache.org/docs-2.0/mod/core.html#options >> # for more information. >> # >> Options Indexes FollowSymLinks >> Options Includes >> >> in an .htacess file in the root of the site I have >> AddType text/html .shtml >> AddHandler server-parsed .shtml >> Options Indexes FollowSymLinks Includes >> >> Although if I change the date format in the shtml file it doesn't change >> in >> the output the rest appears to test ok. >> I think I have it all now. Any corrections needed? >> >> "wiggledbits" <abigdipst...@gmail.com> wrote in message >> >> news:12sgc7efcoij27c@corp.supernews.com... >> >> > Just got it going. Yes there were some typos and I got more info from >> > some >> > other links. >> > Thanks again. >> > Oh and it was Centos 4.4. >> >> > "shimmyshack" <matt.fa...@gmail.com> wrote in message >> >news:1170744621.101413.6640@q2g2000cwa.googlegrou ps.com... >> >> On Feb 6, 6:18 am, "wiggledbits" <abigdipst...@gmail.com> wrote: >> >>> I want to get SS includes going on my Apache 2.x but I seem to be >> >>> missing >> >>> something. >> >> >>> I have >> >>> <Directory "/home/web/blah/blah"> >> >>> Options +Includes >> >>> AddOutputFilter INCLUDES .shtml >> >>> AddType text/html .shtml >> >>> AddHandler server-parsed .shtml >> >>> </Directory> >> >> >>> I have tried without the + on Includes. >> >>> I have tried these directives in the vhost section. >> >>> I can't get the files parsed. I have a test file >> >>> <html> >> >>> <head> >> >>> <TITLE> Test of SSI </TITLE> >> >>> </head> >> >>> <body> >> >>> <center> >> >>> <h1><!--#config errmsg="mod_include is unable to parse your code!"--> >> >>> Today is <!--#echo var="DATE_LOCAL"--> >> >>> <!--#config timefmt="%B %d, %y"--> >> >>> <!--#include file="include_bttm.html--> >> >>> <!--#include file="/home/web/blah/include_bttm.html> >> >>> </center> >> >>> </body> >> >>> </html> >> >>> and only get "Today is" in the browsers. >> >>> Nothing in the error log and access log shows the GET!?? >> >>> What am I missing?? >> >>> Thanks. >> >> >> well there are few typos there: try this instead: >> >> >> <html> >> >> <head> >> >> <TITLE> Test of SSI </TITLE> >> >> </head> >> >> <body> >> >> <center> >> >> <h1> >> >> >> <!--#config errmsg="mod_include is unable to parse your code!"--> >> >> >> <!--#config timefmt="%B %d, %Y" --> >> >> Today is <!--#echo var="DATE_LOCAL" --> >> >> >> <!--#include file="include_1.html" --> >> >> >> <!--#include virtual="/ssi/include_2.html" --> >> >> </center> >> >> </body> >> >> </html> >> >> >> you didnt say which OS youre on, do you have the required x bit set? >> >> If not it should work provided the path given in your <Directory "/ >> >> path"> is ok. > > you shouldnt need the config in an htaccess file as well as the conf, > it all depends how secure you want to be, for just a couple of SSIs I > would turn off htaccess altogether (in fact never use it if you have > httpd.conf control) > use a > <Directory "path/to/where/you/need/SSIs"> > Options +Includes > AddHandler server-parsed .shtml > AddOutputFilter INCLUDES .shtml > </Directory> > > That should be enough, the + in front of Includes is here in my setup > because I have Includes off globally. > (in other words for the server document root and up includes indexes > etc.. is off, and i turn it on per directory the + overrides the > global setting) > > SSIs are a bad thing in general in my opinion as you dont get enough > control of what they spew out unless you start including the output > from programs, be careful of being too loose with permissions SSIs can > be used to execute processes on the server with server permissions. > > The time thing is funny, I couldnt get it to control the format > either, although I went to the docs to copy and paste. Not sure why, > perhaps an expert can say! (2.2.4/XP_PRO briefly ) > |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On 6 Feb, 19:33, "wiggledbits" <abigdipst...@gmail.com> wrote:
> My use of the directives was mostly for testing. My intent is to use ssi for > some header and footer includes. I do not plan on implementing the XBitHack. > > I was thinking I should be able to add the content of the .htaccess file > into the vhost config section. I prefer to have this allowed only where it > is used. > > Thanks. > > "shimmyshack" <matt.fa...@gmail.com> wrote in message > > news:1170752314.344288.187030@j27g2000cwj.googlegr oups.com... > > > On 6 Feb, 08:30, "wiggledbits" <abigdipst...@gmail.com> wrote: > >> OK just to make sure I have this correct... > >> I have in my httpd.conf file > >> # To parse .shtml files for server-side includes (SSI): > >> # (You will also need to add "Includes" to the "Options" directive.) > >> # > >> AddType text/html .shtml > >> AddOutputFilter INCLUDES .shtml > >> . > >> . > >> . > >> # The Options directive is both complicated and important. Please see > >> #http://httpd.apache.org/docs-2.0/mod/core.html#options > >> # for more information. > >> # > >> Options Indexes FollowSymLinks > >> Options Includes > > >> in an .htacess file in the root of the site I have > >> AddType text/html .shtml > >> AddHandler server-parsed .shtml > >> Options Indexes FollowSymLinks Includes > > >> Although if I change the date format in the shtml file it doesn't change > >> in > >> the output the rest appears to test ok. > >> I think I have it all now. Any corrections needed? > > >> "wiggledbits" <abigdipst...@gmail.com> wrote in message > > >>news:12sgc7efcoij27c@corp.supernews.com... > > >> > Just got it going. Yes there were some typos and I got more info from > >> > some > >> > other links. > >> > Thanks again. > >> > Oh and it was Centos 4.4. > > >> > "shimmyshack" <matt.fa...@gmail.com> wrote in message > >> >news:1170744621.101413.6640@q2g2000cwa.googlegrou ps.com... > >> >> On Feb 6, 6:18 am, "wiggledbits" <abigdipst...@gmail.com> wrote: > >> >>> I want to get SS includes going on my Apache 2.x but I seem to be > >> >>> missing > >> >>> something. > > >> >>> I have > >> >>> <Directory "/home/web/blah/blah"> > >> >>> Options +Includes > >> >>> AddOutputFilter INCLUDES .shtml > >> >>> AddType text/html .shtml > >> >>> AddHandler server-parsed .shtml > >> >>> </Directory> > > >> >>> I have tried without the + on Includes. > >> >>> I have tried these directives in the vhost section. > >> >>> I can't get the files parsed. I have a test file > >> >>> <html> > >> >>> <head> > >> >>> <TITLE> Test of SSI </TITLE> > >> >>> </head> > >> >>> <body> > >> >>> <center> > >> >>> <h1><!--#config errmsg="mod_include is unable to parse your code!"--> > >> >>> Today is <!--#echo var="DATE_LOCAL"--> > >> >>> <!--#config timefmt="%B %d, %y"--> > >> >>> <!--#include file="include_bttm.html--> > >> >>> <!--#include file="/home/web/blah/include_bttm.html> > >> >>> </center> > >> >>> </body> > >> >>> </html> > >> >>> and only get "Today is" in the browsers. > >> >>> Nothing in the error log and access log shows the GET!?? > >> >>> What am I missing?? > >> >>> Thanks. > > >> >> well there are few typos there: try this instead: > > >> >> <html> > >> >> <head> > >> >> <TITLE> Test of SSI </TITLE> > >> >> </head> > >> >> <body> > >> >> <center> > >> >> <h1> > > >> >> <!--#config errmsg="mod_include is unable to parse your code!"--> > > >> >> <!--#config timefmt="%B %d, %Y" --> > >> >> Today is <!--#echo var="DATE_LOCAL" --> > > >> >> <!--#include file="include_1.html" --> > > >> >> <!--#include virtual="/ssi/include_2.html" --> > >> >> </center> > >> >> </body> > >> >> </html> > > >> >> you didnt say which OS youre on, do you have the required x bit set? > >> >> If not it should work provided the path given in your <Directory "/ > >> >> path"> is ok. > > > you shouldnt need the config in an htaccess file as well as the conf, > > it all depends how secure you want to be, for just a couple of SSIs I > > would turn off htaccess altogether (in fact never use it if you have > > httpd.conf control) > > use a > > <Directory "path/to/where/you/need/SSIs"> > > Options +Includes > > AddHandler server-parsed .shtml > > AddOutputFilter INCLUDES .shtml > > </Directory> > > > That should be enough, the + in front of Includes is here in my setup > > because I have Includes off globally. > > (in other words for the server document root and up includes indexes > > etc.. is off, and i turn it on per directory the + overrides the > > global setting) > > > SSIs are a bad thing in general in my opinion as you dont get enough > > control of what they spew out unless you start including the output > > from programs, be careful of being too loose with permissions SSIs can > > be used to execute processes on the server with server permissions. > > > The time thing is funny, I couldnt get it to control the format > > either, although I went to the docs to copy and paste. Not sure why, > > perhaps an expert can say! (2.2.4/XP_PRO briefly ) yes you can add it to your vhosts section, but how about creating a "httpd-directory.conf" config file, cos you will get more and more of these rulesets, in this conf file have all the directory blocks in "file system alphabetic order" <Directory "/path/to/here/"></Directory> then /path/to/there/ /yet/another/path/ and so on - neat. you include the httpd-directory.conf from the main httpd.conf by using Include conf/httpd-directory.conf It turns out that this is one of the biggest config files. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Yes thanks for the reminder, that is how we did it where I used to work. For
each v-domain we created a conf file and just included it from httpd.conf. We'd name them domainName.mydomain.httpd.conf. Really s to keep the Oh $%!* I edited the wrong section mistakes. Joe "shimmyshack" <matt.farey@gmail.com> wrote in message news:1170801822.682588.124820@l53g2000cwa.googlegr oups.com... > On 6 Feb, 19:33, "wiggledbits" <abigdipst...@gmail.com> wrote: >> My use of the directives was mostly for testing. My intent is to use ssi >> for >> some header and footer includes. I do not plan on implementing the >> XBitHack. >> >> I was thinking I should be able to add the content of the .htaccess file >> into the vhost config section. I prefer to have this allowed only where >> it >> is used. >> >> Thanks. >> >> "shimmyshack" <matt.fa...@gmail.com> wrote in message >> >> news:1170752314.344288.187030@j27g2000cwj.googlegr oups.com... >> >> > On 6 Feb, 08:30, "wiggledbits" <abigdipst...@gmail.com> wrote: >> >> OK just to make sure I have this correct... >> >> I have in my httpd.conf file >> >> # To parse .shtml files for server-side includes (SSI): >> >> # (You will also need to add "Includes" to the "Options" directive.) >> >> # >> >> AddType text/html .shtml >> >> AddOutputFilter INCLUDES .shtml >> >> . >> >> . >> >> . >> >> # The Options directive is both complicated and important. Please see >> >> #http://httpd.apache.org/docs-2.0/mod/core.html#options >> >> # for more information. >> >> # >> >> Options Indexes FollowSymLinks >> >> Options Includes >> >> >> in an .htacess file in the root of the site I have >> >> AddType text/html .shtml >> >> AddHandler server-parsed .shtml >> >> Options Indexes FollowSymLinks Includes >> >> >> Although if I change the date format in the shtml file it doesn't >> >> change >> >> in >> >> the output the rest appears to test ok. >> >> I think I have it all now. Any corrections needed? >> >> >> "wiggledbits" <abigdipst...@gmail.com> wrote in message >> >> >>news:12sgc7efcoij27c@corp.supernews.com... >> >> >> > Just got it going. Yes there were some typos and I got more info >> >> > from >> >> > some >> >> > other links. >> >> > Thanks again. >> >> > Oh and it was Centos 4.4. >> >> >> > "shimmyshack" <matt.fa...@gmail.com> wrote in message >> >> >news:1170744621.101413.6640@q2g2000cwa.googlegrou ps.com... >> >> >> On Feb 6, 6:18 am, "wiggledbits" <abigdipst...@gmail.com> wrote: >> >> >>> I want to get SS includes going on my Apache 2.x but I seem to be >> >> >>> missing >> >> >>> something. >> >> >> >>> I have >> >> >>> <Directory "/home/web/blah/blah"> >> >> >>> Options +Includes >> >> >>> AddOutputFilter INCLUDES .shtml >> >> >>> AddType text/html .shtml >> >> >>> AddHandler server-parsed .shtml >> >> >>> </Directory> >> >> >> >>> I have tried without the + on Includes. >> >> >>> I have tried these directives in the vhost section. >> >> >>> I can't get the files parsed. I have a test file >> >> >>> <html> >> >> >>> <head> >> >> >>> <TITLE> Test of SSI </TITLE> >> >> >>> </head> >> >> >>> <body> >> >> >>> <center> >> >> >>> <h1><!--#config errmsg="mod_include is unable to parse your >> >> >>> code!"--> >> >> >>> Today is <!--#echo var="DATE_LOCAL"--> >> >> >>> <!--#config timefmt="%B %d, %y"--> >> >> >>> <!--#include file="include_bttm.html--> >> >> >>> <!--#include file="/home/web/blah/include_bttm.html> >> >> >>> </center> >> >> >>> </body> >> >> >>> </html> >> >> >>> and only get "Today is" in the browsers. >> >> >>> Nothing in the error log and access log shows the GET!?? >> >> >>> What am I missing?? >> >> >>> Thanks. >> >> >> >> well there are few typos there: try this instead: >> >> >> >> <html> >> >> >> <head> >> >> >> <TITLE> Test of SSI </TITLE> >> >> >> </head> >> >> >> <body> >> >> >> <center> >> >> >> <h1> >> >> >> >> <!--#config errmsg="mod_include is unable to parse your code!"--> >> >> >> >> <!--#config timefmt="%B %d, %Y" --> >> >> >> Today is <!--#echo var="DATE_LOCAL" --> >> >> >> >> <!--#include file="include_1.html" --> >> >> >> >> <!--#include virtual="/ssi/include_2.html" --> >> >> >> </center> >> >> >> </body> >> >> >> </html> >> >> >> >> you didnt say which OS youre on, do you have the required x bit >> >> >> set? >> >> >> If not it should work provided the path given in your <Directory "/ >> >> >> path"> is ok. >> >> > you shouldnt need the config in an htaccess file as well as the conf, >> > it all depends how secure you want to be, for just a couple of SSIs I >> > would turn off htaccess altogether (in fact never use it if you have >> > httpd.conf control) >> > use a >> > <Directory "path/to/where/you/need/SSIs"> >> > Options +Includes >> > AddHandler server-parsed .shtml >> > AddOutputFilter INCLUDES .shtml >> > </Directory> >> >> > That should be enough, the + in front of Includes is here in my setup >> > because I have Includes off globally. >> > (in other words for the server document root and up includes indexes >> > etc.. is off, and i turn it on per directory the + overrides the >> > global setting) >> >> > SSIs are a bad thing in general in my opinion as you dont get enough >> > control of what they spew out unless you start including the output >> > from programs, be careful of being too loose with permissions SSIs can >> > be used to execute processes on the server with server permissions. >> >> > The time thing is funny, I couldnt get it to control the format >> > either, although I went to the docs to copy and paste. Not sure why, >> > perhaps an expert can say! (2.2.4/XP_PRO briefly ) > > yes you can add it to your vhosts section, but how about creating a > "httpd-directory.conf" config file, cos you will get more and more of > these rulesets, in this conf file have all the directory blocks in > "file system alphabetic order" > <Directory "/path/to/here/"></Directory> > then > /path/to/there/ > /yet/another/path/ > > and so on - neat. > you include the httpd-directory.conf from the main httpd.conf by using > > Include conf/httpd-directory.conf > > It turns out that this is one of the biggest config files. > |
|
![]() |
| Outils de la discussion | |
|
|