Configuring PHP,CGI server with Apacheserver _php tutorial

Source: Internet
Author: User
Tags install perl ultraedit
Author: Coolfire Now there are more and more personal webmaster need to understand how to configure their own php,cgi server under Windows System, to facilitate local debugging CGI and PHP programs. We can use Apache (Windows edition) to do it once: The following is my own article about installing and configuring Apache Server in a stand-alone Windows environment.   If you are testing your website in a Windows standalone environment, it is recommended that you refer to it. This includes: Installing and configuring Apache Server, using Perl CGI scripts, and using PHP scripts. --part of the content is referenced in the Apache Server system Administrator's Manual. First, the installation under Windows of course, you have to have the Apache installation program. You might as well go to http://www.apache.org/dist first. Here is a list of the world-wide Apache mirror sites and find the one closest to you. If at home, it is recommended that you go to the software house to see. The general filename of a pache installer is apache_1_3_x.win32.exe.   Take it to your machine and run it. Setup will prompt you to modify the default directory location for Apache installation C:Program Filesapache Groupapache. To facilitate future configuration and maintenance, it is recommended that you install it in the root directory, for example C:apache. After that you will be prompted to choose the type of installation, it is recommended that you choose Cus tom (custom) so that you will know what is installed. Specific items are application file (application file), source code, Apache Manual (Apache manual), Additional Modules (add-on module), Icons (icon), repuired Directories (required directory).   You can decide how to install it according to your situation. If everything goes well (there should be no problem at this point), 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 for a general understanding.   Second, configure Apache server here first is the basic configuration, so that your Apache server to run with your will.   Open the confhttpd.conf file with UltraEdit-32 (or other text editing software). 1, find to servername. Define your domain name here. ThisWhen Apache server is running, you can access your site in the browser.   If there is a # in front of it, remember to delete it, which is the comment mark of Conf. 2, find to serveradmin. Enter your e-mail address here.   If you are only using a single machine, it doesn't matter if you change it. 3, to find. Down there is an options, minus all the arguments, plus one all (note the case-sensitive!) Same below   Then there is an allow Override, which also removes all subsequent arguments, plus an all. 4, find to DocumentRoot. This statement specifies your Web site path, which is the directory where your page is located. You can use the default, or you can specify one yourself, but remember, the end of this sentence do not? quot;/ "。   Also note that the directory "" is written as "/" in Apache server. 5, find to DirectoryIndex. This is the first page that appears on your site. After you have changed these, you can start Apache server. Did you see your homepage? If not, follow the above steps and carefully modify it. Iii. increasing support for Perl CGI scripts to enable your Apache server to support CGI scripts, first install Perl for Win32. The installation process is not described in detail. This assumes that Perl is installed under the C:perl directory.   Open the httpd.conf file. 1, find to scriptalias/cgi-bin/"c:/apache/cgi-bin/".   Delete the previous # and point the path in "" to the directory where you stored the CGI script, that is, the CGI script in this directory can be executed. 2, to find. Point the path in "" to the directory where you stored the CGI script, as in the above.   The parameter for change options, allow Override is all. 3. Find the AddHandler cgi-script. CGI. Delete the previous #, followed by the. Pl. Note: The Perl interpretation path in the CGI script changes to: #! C:perlinperl. Otherwise, a 500 error will occur. Iv. add support for PHP scripts as well, it is also necessary to install the version of Windows in PHP.   Assume that it is installed under the c:php directory. In the httpd.conf file, add: scriptalias/php/"c:/php/" AddType application/x-httpd-php3. PhP3. php. phtml Action ApplicAtion/x-httpd-php3 "/php/php.exe" your PHP script can be placed anywhere in the site (except for Cgi-bin).   Here, your Apache Server can support both CGI and PHP. Yes, it's good. Good luck!

http://www.bkjia.com/PHPjc/509167.html www.bkjia.com true http://www.bkjia.com/PHPjc/509167.html techarticle Author: Coolfire Now there are more and more personal webmaster need to understand how to configure their own php,cgi server under Windows System, to facilitate local debugging CGI and PHP programs. We are ...

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