How to Set SSI and CGI in Apache server

Source: Internet
Author: User
How to Set SSI and CGI in Apache server-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Apache is highly portable and supports over 30 operating systems, including Unix, Windows, and Darwin, most of the domains registered on the network currently use Apache Web servers. ApacheSoftware Foundation is currently developing Apache2.0, which is now in alpha testing. Here, I will discuss how to modify Server options so that the Server can provide simple dynamic web content, that is, support for CGI programs and Server-Side Include (SSI) programs.

   1. Preparations

First, I suppose you have installed Apache and your Apache can provide static Web pages for browsing. Apache installation will automatically include a static HTML test page, that is, if you can see the test page, it means that your Apache can work normally. Apache under Basic installation only provides static HTML web pages. However, you can use modules to improve its functions. In the original settings, Apache compilation will contain mod_include and moc_cgi modules. You can run./httpd-l in the bin subdirectory to check whether your Apache has these two modules. The output will be a long string of all modules installed by Apache. If the mod_include and moc_cgi modules are not in the list, you must recompile the server. During re-compilation, determine how to include the description of mod_include and moc_cgi modules. In addition, you must have Server-Side endpoints des (http://www.oreilly.com/catalog/apache/excerpt/ch10.html) that provides real-time web pages ). With server-side distributed des (SSI) support, you can create real-time dynamic web pages. Next, I will start with the server's SSI support settings and then write CGI.

   2. Apache settings

First, you must find the Apache configuration file. The original installation directory of Apache is/usr/local/apache under Unix, and c: \ Program Files \ Apache under Windows. In the conf subdirectory, you will find the httpd. conf file. This is the Apache configuration file. This setting file is a plain text file, so you can use a general text editor, such as vi or Notepad, to edit it. First, note that the starting text of some rows in this profile is the # symbol, which indicates that all the texts in this row are comments. It is a good habit to annotate your profile properly, because it helps you remember the settings you have made and why.

   3. Execute the SSI Program

Enable the settings file and search for the following text:
QUOTE:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.