In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge of this article "how to configure Apache and Nginx on the server side", so the editor summarizes the following content, detailed content, 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 configure the server side of Apache and Nginx" article.
1. Apache configure ssi function
Modify apache configuration file httpd.conf
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.
II. Nginx configure ssi function
Add the following sentences to the http paragraph:
Ssi on
Ssi_silent_errors off
Ssi_types text/shtml
III. Shtml simplified tutorial
You can write ssi instructions in shtml files. When the client accesses these shtml files, the server will read and interpret these shtml files and interpret the ssi instructions contained in the shtml file.
For example: you can use the ssi instruction in the shtml file to reference other html files (# include). The file sent by the server to the client is the interpreted shtml that does not have the ssi instruction. It realizes the function that html does not have, that is, it can achieve dynamic shtml, which can be said to be a kind of evolution of html. Like Sina's news system, the news content is fixed, but the advertisements and menus on it are quoted with # include.
At present, there are mainly the following uses:
1. Display server-side environment variables
Name of this document:
Now time:
Show ip address
2. Insert the text content directly into the document
The file file name is a relative path relative to the directory where the document using the # include directive is located. The included file can be in the same level directory or its subdirectory, but not in the next level directory. If it represents an nav_head.htm document in the current directory, it is file= "nav_head.htm".
The virtual file name is the full path to the virtual directory on the web site. If it represents a nav_head.htm file in the hoyi directory relative to the server document root directory; it is virtual= "/ hoyi/nav_head.htm"
3. Display information related to web documents (such as file production date / size, etc.)
Last updated date of the file:
Length of the file:
4. Execute various programs on the server directly (such as cgi or other executable programs)
Insert the output of an external program into the page. You can insert input from a cgi program or a regular application, depending on whether the parameter used is cmd or cgi.
5. Set the display format of ssi information (such as file production date / size display)
6. Advanced ssi can set variables to use if conditional statements.
II. Shtml simplified tutorial
You can write ssi instructions in shtml files. When the client accesses these shtml files, the server will read and interpret these shtml files and interpret the ssi instructions contained in the shtml file. For example: you can use the ssi instruction in the shtml file to reference other html files (# include). The file sent by the server to the client is the interpreted shtml that does not have the ssi instruction. It realizes the function that html does not have, that is, it can achieve dynamic shtml, which can be said to be a kind of evolution of html. Like Sina's news system, the news content is fixed, but the advertisements and menus on it are quoted with # include.
At present, there are mainly the following uses:
1. Display server-side environment variables
Name of this document:
Now time:
The file file name is a relative path relative to the directory where the document using the # include directive is located. The included file can be in the same level directory or its subdirectory, but not in the next level directory. If it represents an nav_head.htm document in the current directory, it is file= "nav_head.htm".
The virtual file name is the full path to the virtual directory on the web site. If it represents a nav_head.htm file in the hoyi directory relative to the server document root directory; it is virtual= "/ hoyi/nav_head.htm"
3. Display information related to web documents (such as file production date / size, etc.)
Last updated date of the file: length of the file:
4. Execute various programs on the server directly (such as cgi or other executable programs)
Insert the output of an external program into the page. You can insert input from a cgi program or a regular application, depending on whether the parameter used is cmd or cgi.
5. Set the display format of ssi information (such as file production date / size display)
6. Advanced ssi can set variables to use if conditional statements.
The above is about the content of this article on "how to configure the server side of Apache and Nginx". 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 about the relevant knowledge, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 210
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.