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/page.shtml — instructions are found on https://httpd.apache.org/docs/current/howto/ssi.html .) mod_rewrite does not work. Using a symbolic link from page to page.html does not work either. Thanks! Answer Apache … Read more

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 COMMON folder in /home/ that holds the universal files /home …site1 …site2 …site3 …site4 …COMMON ……..universal.css ……..universal.js ……..universal.php …site999 …site1000 Adding … Read more

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 eg. http://testwp.humbug.in/test/index.html works fine but http://testwp.humbug.in/test/ doesn’t work. In chrome it gives a “Error 324 (net::ERR_EMPTY_RESPONSE)” error while in firefox it shows a blank page. What additional … Read more

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 href=”donate.html”>Do your part – donate!</a> </center> …but this one comes up as garbage (it should show a calendar, and works fine when I call the script manually in the browser); … Read more

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; gzip_disable “msie6”; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_min_length 256; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; I … Read more

Transfer Compression with Cloudfront and nginx SSI

Is there any way to enable GZIP / Brotli compression on Cloudfront if the origin is a nginx server with SSI (Server Side Includes) enabled? The issue seems that nginx SSI drops the Content-Length header, as it doesn’t know the content length at the time of sending the headers as the file hasn’t been parsed. … Read more

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 Answer You need to set the include_path in either your application or in the php.ini file. This is often in /etc/php.ini or /usr/local/etc/php.ini. AttributionSource : Link , Question Author : NitroxDM … Read more