[solved] localhost server side includes (SSI)
-
- Posts: 28
- Joined: 2012-06-05 06:05
- Location: Pori, Finland
- Has thanked: 2 times
[solved] localhost server side includes (SSI)
hello
I have not succeeded to activate apache2.4 "server side includes" on my localhost. I have debian jessie (stable) installation and the web server is running ok, but with SSI services nothing happens.
Any advice is welcome!
regards: Harri
I have not succeeded to activate apache2.4 "server side includes" on my localhost. I have debian jessie (stable) installation and the web server is running ok, but with SSI services nothing happens.
Any advice is welcome!
regards: Harri
Last edited by harritapio on 2016-10-31 04:59, edited 1 time in total.
Harri
- ralph.ronnquist
- Posts: 342
- Joined: 2015-12-19 01:07
- Location: Melbourne, Australia
- Been thanked: 6 times
Re: localhost server side includes (SSI)
Gratuitously: Google's first suggestion is http://httpd.apache.org/docs/current/howto/ssi.html
Been there? Done that?
Been there? Done that?
-
- Posts: 28
- Joined: 2012-06-05 06:05
- Location: Pori, Finland
- Has thanked: 2 times
Re: localhost server side includes (SSI)
Yes, I have been there and done the modifications. Unfortunately SSI does not give any response!
Harri
- dilberts_left_nut
- Administrator
- Posts: 5423
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 18 times
- Been thanked: 81 times
Re: localhost server side includes (SSI)
Maybe you should explain what you are trying, what you expect to happen and what actually happens - in detail.
AdrianTM wrote:There's no hacker in my grandma...
- ralph.ronnquist
- Posts: 342
- Joined: 2015-12-19 01:07
- Location: Melbourne, Australia
- Been thanked: 6 times
Re: localhost server side includes (SSI)
+lots @dilberts_left_nut
Which particular nothing is it that doesn't happens? Perhaps it is that you do have a page named example.shtml that contains an SSI comment for today's date, and when you access that page you see all else, but that comment is not replaced by today's date?
And you have already followed up on that which "Chas" wrote 83 days ago, to make sure it doesn't apply for you?
Which particular nothing is it that doesn't happens? Perhaps it is that you do have a page named example.shtml that contains an SSI comment for today's date, and when you access that page you see all else, but that comment is not replaced by today's date?
And you have already followed up on that which "Chas" wrote 83 days ago, to make sure it doesn't apply for you?
-
- Posts: 28
- Joined: 2012-06-05 06:05
- Location: Pori, Finland
- Has thanked: 2 times
Re: localhost server side includes (SSI)
Ok, I will try to explain more.
I'm testing new web pages on my local computer (debian jessie stable) before loading them to the server. Localhost is working correctly, and as a matter of fact I can test all pages already now. With SSI I thought to include e.g. standard header/footer to the pages I can manage the task without SSI but if I can make it work, it's an interesting option to add some basic functionality to web pages.
When I add this sentence into an html page and open it in web browser, the page opens correct but nothing from SSI is included. When I check the "page source" from opened web page I can see the included SSI sentence there but for some reason SSI is not activated. I have checked also apache error log - nothing relevant there.
I have tested the functionality as a normal user and as a root - it makes no difference.
Thank you for your replies!
I'm testing new web pages on my local computer (debian jessie stable) before loading them to the server. Localhost is working correctly, and as a matter of fact I can test all pages already now. With SSI I thought to include e.g. standard header/footer to the pages
Code: Select all
<!--#include virtual="file.shtml" -->
When I add this sentence
Code: Select all
<!--#include virtual="file.shtml" -->
I have tested the functionality as a normal user and as a root - it makes no difference.
Thank you for your replies!
Harri
- ralph.ronnquist
- Posts: 342
- Joined: 2015-12-19 01:07
- Location: Melbourne, Australia
- Been thanked: 6 times
Re: localhost server side includes (SSI)
Again; first google hit for "SSI include virtual"
http://www.htmlgoodies.com/beyond/webma ... ommand.htm says:
http://www.htmlgoodies.com/beyond/webma ... ommand.htm says:
A relative file name might be interpreted relative to the current working directory of the server? To quote further:You would use the virtual argument if the file you are calling for is located in a position requiring an address starting at the server root. That's an academic way of saying the file isn't in the same directory as the page that's calling for it.
.. or maybe your problem is something else?Rule of Thumb
Use "file=" when the included file is within the same directory as the page that wants it. Use "virtual=" when it isn't.
-
- Posts: 28
- Joined: 2012-06-05 06:05
- Location: Pori, Finland
- Has thanked: 2 times
Re: localhost server side includes (SSI)
Good news, I got it working on server!
I used the info you told on previous message and the response from server is ok. I must use .shtml files for SSI but that's ok.
was false is the way to go.
Thank you for your advice!
I used the info you told on previous message and the response from server is ok. I must use .shtml files for SSI but that's ok.
Code: Select all
<!--#include virtual
Code: Select all
<!--#include
Thank you for your advice!
Harri