Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
to both the apache.conf and "default" site configuration...i linked /etc/apache2/mods-available/include.load to /etc/apache2/mods-enabled/include.load, so the include_module should be running. I have also added Options +Includes to the default site file under <Directory /> and <Directory /var/www> sections...the files with <!--#echo var="REQUEST_URI" --> are shtml files... (.header.shtml and .readme.shtml)...it still only says "index of" and leaves the rest blank (in the source, the words index of are before <!--#echo var="REQUEST_URI" -->) soo...it'd be nice if i could get this working...do i need something besides ssi to get this working? did i miss configuring something?
thx for the help,
chris
oh, im running debian linux in case that matters.. >.>
In apache2 I usually take out:
AddHandler server-parsed .shtml
And leave in the AddType text/html .shtml
Also make sure you do not have any other Options overriding the option for +Includes. So for example I would have something like this, I also think debian sarge requires IncludesNoExec to be on:
ummm ok! the <!--#echo var="DATE_LOCAL" --> WORKED! but the <!--#echo var="REQUEST_URI" --> still doesnt...i coulda sworn that was in a list of ssi commands...do i have to configure it or something? is there something besides ssi that would do it??
EDIT: hmmm...ok im getting somewhere now...it doesnt work in subdirectories! it treats it as a comment from subdirectories...does that help any? it only works if the script is in a file in /var/www...
Hrmm, it sounds like either you have an Options statement overriding those subdirectories or you have set it up to only be the root directory. It would be nice if you uploaded your config. Otherwise if I were configuring my root directory and all other directories to be ssi I would have the following directory block in my config:
NameVirtualHost *
<VirtualHost *>
DocumentRoot /var/www/
<Directory /var/www/>
Options +Includes IncludesNoExec FollowSymLinks
SetOutputFilter INCLUDES
AllowOverride None
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel debug
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
hehe, i forget why i needed to add the /var/www/uftp sdirectory to the site config lol..nd in apache2.conf, ignore the sun lines LOL i deleted those cuz it misconfigured... >.>
For the virtual host config file change:
<Directory />
Options FollowSymLinks
AllowOverride none
#AddType text/html .shtml
#AddHandler server-parsed .shtml
SetOutputFilter INCLUDES
</Directory>
To:
<Directory />
Options Indexes FollowSymLinks +Includes IncludesNoExec
AllowOverride none
SetOutputFilter INCLUDES
</Directory>
And Change This:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews +Includes
AllowOverride all
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# RedirectMatch ^/$ /apache2-default/
AddType text/html .shtml
AddHandler server-parsed .shtml
</Directory>
To:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews +Includes IncludesNoExec
SetOutputFilter INCLUDES
AllowOverride all
Order allow,deny
allow from all
</Directory>
nope, still doesnt work =/ eh i think i found the problem though...
.htaccess files
im still trying to figure out how these work...i used to think that i needed them in every directory so that the index directory listing will load the readme.shtml and header.shtml but i deleted them, and it still uses the header and readme like 3 subdirectories down...and the script doesnt work...but anyway, when i put the .htaccess file i use in /var/www the ssi no longer works...
so basically, is there somewhere i can specify for it to use the .readme.shtml and .header.shtml in ever directory, so i can delete the .htaccess files (the easy way), or is there a way i can add a directive or something to the .htaccess files to make it work? (the hard way)
Yes, you can put directives directly into your htaccess file. In this case those htaccess files probably have an option directive that is overriding the one in your config file. Make sure the option directives in your .htaccess files have the following:
Options +Includes
I am not sure as to what you mean by using the .readme.shtml files. Hrmm,
i cant add +Options to .htaccess files =/ when i do it says "Internal Server Error" blah blah blah lol umm...yea..the .header.shtml and .readme.shtml just add a header and footer to the index directory listing, and makes the directory listing use the style of the .header.shtml file, effectively making them look very nice..this is whats in my .htaccess file..
For the .htaccess file you would add +Includes under the already existing Options directive like so
Options Indexes +Includes IncludesNoExec
IndexOptions -FancyIndexing +IgnoreCase +SuppressDescription NameWidth=* +SuppressHTMLPreamble +FoldersFirst
HeaderName .header.shtml
ReadmeName .readme.shtml
Or you can just put the HeaderName and ReadmeName under the main config like so and not use your .htaccess:
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing IgnoreCase VersionSort SuppressHTMLPreamble
ReadmeName /var/www/footer.shtml
HeaderName /var/www/header.shtml
</IfModule>
yea, i just redid the .htaccess files...since it apparently controls all the subdirectories though, it was extremely easy...works just great now, thanks a lot for all your help eerwitt!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.