• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

Apache for Newbie: Set up server-side includes (SSI)

December 17, 2023

Apache for Newbie: Set up server-side includes (SSI)

Setting up a server can be a daunting task for beginners, especially when it comes to configuring server-side includes (SSI). However, with the right guidance and tools, it can be a straightforward process. In this article, we will walk you through the steps to set up SSI on your Hong Kong VPS Hosting server.

What is Server-Side Includes (SSI)?

SSI is a server-side scripting language that allows you to include the content of one file into another file on the server. This is useful for including common elements such as headers, footers, or navigation menus across multiple pages on your website. SSI is supported by most web servers, including Apache, which is one of the most popular web servers used in VPS hosting.

Enabling SSI on Apache

To enable SSI on Apache, you need to make sure that the mod_include module is loaded. You can do this by editing the Apache configuration file, which is usually located at /etc/httpd/conf/httpd.conf or /etc/apache2/apache2.conf, depending on your hosting provider.


# LoadModule include_module modules/mod_include.so

Uncomment the above line by removing the # sign at the beginning of the line. This will load the mod_include module when Apache starts.

Configuring SSI

Once the mod_include module is loaded, you need to configure Apache to process SSI. You can do this by adding the following lines to your Apache configuration file:


AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

This tells Apache to treat files with the .shtml extension as HTML files and to process SSI directives in those files.

Using SSI

To use SSI, you need to create an HTML file with the .shtml extension and include the SSI directives in the file. For example, to include a header file called header.html, you would use the following SSI directive:


<!--#include file="header.html" -->

This will include the content of the header.html file at the location of the SSI directive in the .shtml file.

Testing SSI

Once you have set up SSI and created your .shtml file, you need to test it to make sure it is working correctly. You can do this by uploading the .shtml file to your Hong Kong VPS Hosting server and accessing it through your web browser. If the SSI directives are processed correctly, you should see the included content in the .shtml file.

Conclusion

Setting up server-side includes (SSI) on Apache can be a simple process with the right guidance. By following the steps outlined in this article, you can easily configure SSI on your Hong Kong VPS Hosting server and start including common elements across multiple pages on your website. With SSI, you can save time and effort by managing your website’s content more efficiently.

Recent Posts

  • Hong Kong VPS for Live Streaming: RTMP Server Setup and Low-Latency Delivery to China (2026)
  • How to Set Up a Mail Server on Hong Kong VPS: Postfix, Dovecot, and Email Deliverability (2026)
  • How to Run a SaaS Product on Hong Kong VPS: Architecture and Deployment Guide 2026
  • Hong Kong VPS Uptime and SLA: What 99.9% Uptime Really Means for Your Business (2026)
  • Cryptocurrency and USDT Payment for VPS Hosting: Why It Matters for Global Businesses (2026)

Recent Comments

  1. Hong Kong VPS Uptime and SLA: What 99.9% Uptime Really Means for Your Business (2026) - Server.HK on How to Monitor Your Hong Kong VPS: Uptime, Performance, and Alert Setup Guide (2026)
  2. Best Hong Kong VPS Providers in 2026: Compared by Speed, Routing, and Value - Server.HK on How to Migrate Your Website to a Hong Kong VPS: Zero-Downtime Transfer Guide (2026)
  3. vibramycin injection on How to Choose the Right Hong Kong VPS Plan: A Buyer’s Guide for 2026
  4. allopurinol for gout on CN2 GIA vs BGP vs CN2 GT: What’s the Real Difference for China Connectivity?
  5. antibiotics online purchase on How to Set Up a WordPress Site on a Hong Kong VPS with aaPanel (Step-by-Step 2026)

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot