Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to make Apache support shtml to realize include file parsing

Shulou Source: shulou.com Published: 2022-05-31 13:57:35 10月04日 Update

Most people do not understand the knowledge points of this article "how to make Apache support shtml to achieve include file parsing", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to let Apache support shtml to achieve include file parsing" article.

1. Confirm that the include.so module is loaded and remove the comments:

Loadmodule include_module libexec/apache2/mod_include.so

2. Remove these two comments in the addtype section:

Addtype text/html .shtml

Addoutputfilter includes .shtml

3. Find it in the permissions of directory directory

Options indexes followsymlinks

Add includes and modify it to:

Options indexes followsymlinks includes

4. Restart apache and test:

Holle wordstones, this is the middle content

The following are the supplements of other netizens:

What is ssi?

Ssi is the abbreviation of English server side includes, which translates into Chinese is the meaning contained on the server side. Technically, a ssi is a command or pointer that can be called through a comment line in an html file. Ssi has a powerful function, as long as a simple ssi command can be used to achieve the entire site content update, time and date dynamic display, as well as the execution of shell and cgi scripts and other complex functions.

How to make your apache server support ssi?

Apache does not support ssi by default, so we need to change the httpd.conf to configure it. Let me take apache 2.0.x of the windows platform as an example. Open the httpd.conf file in the conf directory and search for "addtype text/html .shtml". The search results:

The copy code is as follows:

# addtype text/html .shtml

# addoutputfilter includes .shtml

Remove the # in front of these two lines.

Then search for "options indexes followsymlinks"

Add "includes" after the line found

Change the line to options indexes followsymlinks includes

Save httpd.conf and restart apache.

The above is about the content of this article on "how to make Apache support shtml to achieve include file parsing". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.

Tags: Content files support search that is comments code functions commands articles servers directories knowledge articles services complex powerful one-line value dynamic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker vpn Shulou Technology Linux