LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-26-2021, 02:46 PM   #1
Nojus.k
LQ Newbie
 
Registered: Sep 2020
Posts: 5

Rep: Reputation: Disabled
Question Debian 10 server - How to get SSI working on apache?


Greetings,

I want to add Server Side Includes(SSI) to my website, so I can update the links dynamically, but I have issues getting it to work on apache. I, of course have the code added to the pages:
Code:
<!--#include virtual="/sidebar.htm" -->
and also added these three lines of code at the bottom of my apache2.conf file:
Code:
Options +Includes
AddType text/html .htm
AddOutputFilter INCLUDES .htm
I'm also using the .htm extension instead of the default .shtml. Did I missed something to add? (P.S SSI worked perfectly fine when I was on IIS in Windows Server, so my pages are confirmed to be fine)
 
Old 10-27-2021, 12:38 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
https://httpd.apache.org/docs/2.4/ho...ml#configuring
 
Old 12-02-2021, 02:22 PM   #3
Nojus.k
LQ Newbie
 
Registered: Sep 2020
Posts: 5

Original Poster
Rep: Reputation: Disabled
Sadly, didn't get it to work, I even changed it from "file" to "virtual", like the docs suggested, but still looks for the file in the same directory where the index file is, instead of the higher directory, where the SSI file is.
error.log:
Code:
[Thu Dec 02 21:22:17.010974 2021] [include:error] [pid 9945] (20023)The given path was above the root path: [client <ip-address>:0] unable to include file $
 
Old 12-02-2021, 03:18 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Nojus.k View Post
Sadly, didn't get it to work, I even changed it from "file" to "virtual", like the docs suggested, but still looks for the file in the same directory where the index file is, instead of the higher directory, where the SSI file is.
error.log:
Code:
[Thu Dec 02 21:22:17.010974 2021] [include:error] [pid 9945] (20023)The given path was above the root path: [client <ip-address>:0] unable to include file $

Well then move the directory to a place it is accessible, like the error helpfully tells you...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache: SSI stopped working Nic-MDKman Linux - Software 0 02-14-2004 09:07 AM
Apache and SSI/CGI PROBLEMS morbo Linux - Networking 2 01-18-2003 04:04 PM
problem with SSI configration on apache 2.0 garfield Linux - Newbie 0 10-12-2002 05:32 AM
ssi in apache lustra Linux - Networking 0 02-28-2002 06:41 PM
Apache and SSI? phek Linux - Newbie 2 10-24-2001 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration