Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [server-side-includes]

Server Side Includes (SSI) is a simple interpreted server-side scripting language used almost exclusively for the Web. The most frequent use of SSI is to include the contents of one or more files into a web page on a web server.

0
votes
2answers
101 views

Passing Nginx custom header or variables to SSI

I'm building web app using SSI to reduce server usage as much as possible (since it small VPS), one of the issue I face is serving different contents/style to mobile users I use custom detect-mobile....
0
votes
0answers
133 views

nginx gzip not working for ssi

I tried setting up gzip compression for server side included files in nginx. I have enabled gzip compression in nginx.conf This is the configuration that I have used: gzip on; gzip_vary on; ...
-1
votes
1answer
49 views

Nginx Server Side Includes and url rewrite

I'm trying to do something that looks very difficult for me. I need to embed a live blog remote HTML url inside my rails app and I don't want to use iframes for SEO. I'm trying to use SSI. I ...
1
vote
1answer
986 views

How to enable SSI in Ubuntu 16.04?

I have an html page with SSI and I was trying for enabling SSI in my apache (V 2.4.18) running on Ubuntu 16.04. As per the guidelines here, I tried editing /etc/apache2/apache2.conf file and now ...
0
votes
1answer
610 views

getting SSI's `exec` to work with apache

so i have an apache-2.4.25 (as packaged in Debian/stretch), and would like to use SSI's exec method. <!--#exec cmd="ls" --> Unfortunately this gives me an error: [an error occurred while ...
0
votes
1answer
862 views

ssi on nginx, using variables and conditionals

I'm using nginx to server up my static pages. To make the menu dynamically change the class="active" on the respective page, I'm trying to use SSI variables. So I have this on the page itself: <!--...
0
votes
0answers
261 views

nginx SSI include, coming up as corrupts code?

I'm trying to get some SSI calls setup on a .html page with nginx. The following works fine: <center><!--# include file="total.txt" --> <br /><br /><a ...
5
votes
0answers
439 views

Environment variables not available on server after mod_rewrite, but works locally

I am working on a site where I am using SSI to set a variable on an HTML page that gets parsed and the variable is then to be picked up by a script after a mod_rewrite rewrite. This works on my local ...
0
votes
2answers
96 views

Enable Server Side Include for Apache on Extensionless URI?

Does anyone know how to enable SSI for URIs such as http//domain.com/page ? (It is straightforward to enable SSI for URIs that have extensions, such as http//domain.com/page.html or http//domain.com/...
0
votes
1answer
3k views

DBD: Can't load driver file apr_dbd_mysql.so

I am using Apache 2 on a virtual machine running a LAMP stack (mysql version 5.6). When I try to restart the server I am getting this error; DBD: Can't load driver file apr_dbd_mysql.so I have made ...
0
votes
1answer
379 views

Can I use the Nginx PageSpeed module together with SSI?

Is it possible to use the Nginx PageSpeed module together with SSI? I can't get SSI up and running when PageSpeed is enabled. But as soon as I disable PageSpeed, SSI works again: location ~ .+\....
0
votes
2answers
71 views

If a web root directory has a simlink that points to a folder one-level up, does that pose a security risk?

Assuming a Linux/Unix system. Not asking about any particular server software, just wondering in general. I want to use this to include javascript libraries or things like that in multiple sites or ...
0
votes
1answer
2k views

Apache 2.4 SSI on Ubuntu 13.04

I have an Ubuntu 13.04 server that had normal, stock Apache 2.2 with SSI working. I got a bug in my ear, and installed the ppa:rhardy/apache24x PPA to get my server upgraded Apache 2.4. While it ...
1
vote
0answers
879 views

PHP SSI with NGINX

I've got a really old website I'd like try running on NGINX instead of Apache. This site consists of many flat HTML files with sporadic PHP SSIs, such as: <!--#include virtual="/some_file.php" --&...
0
votes
1answer
452 views

Automatically prepend executable Perl scripts using .htaccess (like php_value auto_prepend_file)?

I have previously built sites using PHP, where I automatically included header and footer html using the following lines in .htaccess on an Apache host: php_value auto_prepend_file "/var/www/html/...
1
vote
1answer
1k views

Nginx ssi with proxy_cache hanging after first request

I am using Nginx's proxy cache for our dynamic pages and have recently integrated ssi. The first page load works fine but once the page is cached and another request comes through the page just hangs. ...
1
vote
1answer
3k views

NGINX SSI Not working

I'm having trouble getting SSI to work on NGINX. You can see the problem if you hit http://www.bakerycamp.com/test.shtml. Here is the contents of that file: <!--# echo hi --> If you hit this ...
1
vote
1answer
480 views

IIS 6.1 Handlers for HTML, ASP, INC files

I have a legacy website in which .HTML, .ASP, and .INC files are being used. Problem is all pages have VBScript code not parsed by IIS and thus written on page as static text. I want to fix it. All ....
10
votes
1answer
9k views

SSI includes not working on Debian with Apache

I'm trying to get SSI to work on Debian running Apache, however the .shtml files are not being parsed. From a PHP file with phpinfo() I can see that the following show up in the loaded modules section:...
1
vote
1answer
733 views

eAccelerator Causes PHP Include to Fail in Wordpress

SERVER: Linux CENTOS 6 PLESK 10.4.4 I have been installing Wordpress on many subdomains on our dedicated server. All of them run CRON jobs every 10 minutes. Long story short, the time to load first ...
1
vote
1answer
2k views

How to include PHP file from a Virtual Directory on IIS?

I would like to know if there is a way to include PHP files from Virtual Directory to a PHP file in site's root. For example I have siteroot: siteroot\index.php siteroot\other.php and a separate ...
2
votes
2answers
2k views

Apache: Include Virtual SSI not working for CGI script

I have the following Server Side Includes within an .html file called test.html... <!--#include virtual="/cgi-bin/myScript.cgi"--> <!--#include virtual="/includes/myFile.html"--> When I ...
3
votes
2answers
2k views

How can I get Apache2 to serve up .shtml files as Content-Type “text/html” and not “text.html”?

I'm working on a website, implemented as shtml, and when I try to load the home page (http://simplyclassicremodeling.com) from IE8, it says it can't open the file because it transferred as Content-...
2
votes
1answer
1k views

Unable to SSI include some CGI scripts

I have a page site.shtml on an Apache server in which I am trying to include a few CGI scripts, like so: <p><pre><!--#include virtual="files/testfile" --></pre></p> ...
2
votes
2answers
2k views

nginx proxy caching and ssi

I am using nginx for caching requests from the upstream apache server, however I want few blocks inside to be fetched from apache all the time. I am hoping ssi can do this, but the SSI tags are ...
2
votes
1answer
1k views

Why does my SetEnvIfNoCase directive does not match requested URI?

I'm attempting to set up Apache such that various error pages display with headers/footers appropriate to the context of the error. If the user was requesting a corporate page, I want to show the ...
4
votes
2answers
2k views

Apache web server intermittently serves 403: “Directory index forbidden by Options directive” and 304

We have configured a web site with SSI for .html files on Apache/2.2.19 on CentOS 5.5 Linux. Works OK, but occasionally get 403 for the root page (index.html served as a directory index). No file ...
2
votes
3answers
3k views

How do I conditionally handle undefined SSI variables using Apache?

I want to include a header in a bunch of pages, like so: header.html: <html> <head> <title>My site</title> </head> To enable a page-specific title, I'm trying ...
0
votes
1answer
166 views

Adding SSI support causes mod_dir “trailing slash” redirect to stop working

I have enabled SSI using the following directives in .htaccess AddHandler server-parsed .html AddOutputFilter INCLUDES html However when I add these, the trailing slash redirects stop working. For ...
1
vote
2answers
1k views

in an SSI include, can the file being included be redirected in an .htaccess file

I have some old html pages that have SSI includes in them to include certain html in all the pages. So, the SSI looks something like this: <!--#include virtual="/includes/noNav/footercode.html"--&...
0
votes
1answer
106 views

php relative path not found

I'm migrating to a new server. Before I could use: include/XXXX.php in /var/site/test.php. Now I have use: /var/site/include/XXXX.php I'm using: Ubuntu 10.4 Apache2 PHP5
0
votes
1answer
1k views

PostgreSQL 9.0 HA load balancing between servers

Hey folks, I'm bashing my head to configure load balancing stuff between two database servers. I have no clue whether, I can find any mechanism to implement this. I already tried to implement Heart ...
2
votes
1answer
129 views

Limit SSI capabilities to only include files

Is there a way to enable SSI on a server (running apache), but only allow the include element (<!--#include -->) and not any other?
3
votes
1answer
1k views

Is it ok to map the SSI handler to .html files in IIS?

I have a site built with static html files and I need to add a segment of markup to every page. The natural choice to accomplish this is to use server-side includes (SSI). The SSI handler does not ...
4
votes
3answers
7k views

Why won't SSI work in IIS?

I can't get IIS to respect my SSI directives - it just outputs the #include directive as if it were regular old html. Here's the relevant data points: My file with the include directive is called ...
1
vote
2answers
879 views

SymLinks vs. PHP Includes (performance)

Which of these 2 is easier/faster for a Linux server running Apache to process? A) A symlink pointing to a php file: file-sym.php ---> file-orig.php B) A PHP file (file-inc.php) including ...
2
votes
2answers
6k views

How to enable SSI for all html files?

I use MAMP to develop sites. I have each site in it's own folder in the htdocs folder. I manage one site that I need to use ssi directives on, because the host doesn't allow php includes. I've un-...
0
votes
3answers
105 views

Server impact of common shared files across hundreds of sites

I am working for a client running a HostGator Dedicated Server with hundreds of sites on it. Since there will be some common files between them I am contemplating doing the following: creating a ...
2
votes
2answers
2k views

How can I enable SSI on HTML pages on GoDaddy (Windows hosting)?

I wish to enable SSI's (server-side includes) on my HTML pages on GoDaddy. I want lines like this to be processed properly: <!--#include virtual="/include/header.html"--> Is this possible and ...
0
votes
2answers
495 views

Apache SHTML including a PHP file

Following this question HTAccess Directory Index with PHP-Files I was able to create my index using a PHP file included in a SHTML file as follows <!--#include virtual="/header.php" --> This ...
1
vote
1answer
763 views

HTAccess Directory Index with PHP-Files

I'm currently trying to fancy up my directory index a little - To do so, I already managed to create a decent layout around the created table - But now, I need to add some scripting, too. As I'm most ...
4
votes
3answers
11k views

How do you enable SSI's in Apache?

I've found information on the web, but it just doesn't make sense to me. I'd like to know exactly what files I should go into, and precisely where and how I should modify them.
0
votes
3answers
595 views

php include file

I have a common framework that resides in /var/www/fw/trunk path, and also have a virtual host that resides in /var/www/vhosts/aerosoftware.net/httpdocs/ on a http://aerosoftware.net/ domain. I ...
0
votes
2answers
3k views

I enabled IIS on Windows 7 but it's not working

I followed Windows instructions, and turned on several parts of IIS. But http://localhost isn't working, and I don't see the IIS entry in Administrative Tools either. I only want to use SSI, not ASP(....