Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure support for PHP and CGI on Windows's Apache server

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to configure support for PHP and CGI on Windows's Apache server". In daily operation, I believe many people have doubts about how to configure support for PHP and CGI on Windows's Apache server. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "how to configure support for PHP and CGI on Windows's Apache server"! Next, please follow the editor to study!

1. Installation under Windows

Of course, you must first have an installer for Apache. You might as well go to http://www.apache.org/dist first. Here is a worldwide list of Apache mirroring sites to find the one closest to you. If you are in China, I suggest you go to the software house to have a look. The general file name of the installer for A pache is apache_1_3_x.win32.exe. Put it in your machine and run it.

The installer will prompt you to change the default directory location of the Apache installation, C:Program FilesApache GroupApache. To facilitate future configuration and maintenance, it is recommended that you install it in the root directory, such as C:Apache. After that, you will be prompted to choose the installation type, and it is recommended that you choose Cus tom so that you will know what is installed. Specific projects are Application File (application file), Source Code (source code), Apache Manual (Apache manual), Additional Modules (add-in), Icons (icon), Repuired Directories (must directory). You can decide how to install it according to your situation.

If all goes well (there should be no problems at this time), the installation will be completed soon. Apache will automatically complete some basic configuration, you can use UltraEdit-32 (or other text editing software) to open the c onfhttpd.conf file to get an overview.

2. Configure Apache Server

The first thing to do here is the basic configuration so that your Apache Server runs as you wish.

Open the confhttpd.conf file with UltraEdit-32 (or other text editing software).

1. ServerName was found. Your domain name is defined here. This way, when Apache Server is running, you can visit your site in your browser. If there is a # before it, remember to delete it, this is the comment mark of conf.

2. ServerAdmin was found. Enter your E-Mail address here. If you only use a stand-alone machine, it doesn't matter whether you change it or not.

3. Find it. There is an Options sentence down, remove all the following parameters, and add an All (pay attention to case sensitivity! Same as below. ), followed by a sentence Allow Override, which also removes all the subsequent parameters and adds an All.

4. DocumentRoot was found. This statement specifies the path to your site, that is, the directory where your home page is placed. You can use the default, or you can specify one yourself, but remember, don't "/" at the end of this sentence. In addition, note that the "" of the directory is written as "/" in Apache Server.

Transferred from: Yitu tutorial website [www.etoow.com] 5, find DirectoryIndex. This is the first home page of your site.

After changing these, you can start Apache Server. Did you see your home page? If not, follow the above steps to revise it carefully.

Third, add support for Perl CGI scripts

To make your Apache Server support CGI scripts, you must first install Perl for Win32 http://www.bbqmw.net/qm_yeqm/. The process of installation is not described in detail. It is assumed that Perl is installed in the C:Perl directory. Open the httpd.conf file.

1. Find ScriptAlias / cgi-bin/ "C:/Apache/cgi-bin/". Delete the previous # and point the path in "" to the directory where you store CGI scripts, that is, CGI scripts in this directory can be executed.

2. Find it. Point the path in "" to the directory where you store the CGI script, the same as above. Change the parameter of Options and Allow Override to All.

At this point, the study on "how to configure support for PHP and CGI on Windows's Apache server" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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: 0

*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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report