How to install Apache2 mod_fcgid and PHP5 on openSUSE 12.3

Source: Internet
Author: User
Keywords Virtual host virtual host Opensuse apache2 mod_fcgid
Tags aliyun apache apache2 host how to html http install

This tutorial describes how to install http://www.aliyun.com/zixun/aggregation/14417.html ">apache2 mod_fcgid and PHP5 on OpenSUSE 12.3. Mod_fcgid can be compatible with the replacement of the old mod_fastcgi, which can replace the Apache user to execute the permissions of the PHP script.

1. Preliminary notes

In this tutorial we use the hostname of the OpenSUSE 12.3 server server1.example.com, the IP address is 192.168.0.100.

In this tutorial, you will create two Apache virtual hosts www.example1.com and www.example2.com for mod_fcgid demo use.

2. Install APACHE2/MOD_FCGI/PHP5

Install Apache2,mod_fcgid and PHP5, as follows:

Zypper Install apache2 Apache2-mod_fcgid php5-fastcgi

If you have installed PHP5 as an Apache module, disable the current PHP5 module:

A2dismod PHP5

Next, enable the suEXEC and Fcgid modules:

suEXEC and Fcgid

Then create the Apache system startup link and run:

Systemctl enable Apache2.service Systemctl start Apache2.service

Next Open/etc/php5/fastcgi/php.ini:

Vi/etc/php5/fastcgi/php.ini

Uncomment line Cgi.fix_pathinfo = 1:

[...] ;  Cgi.fix_pathinfo provides *real* path_info/path_translated support for CGI. PHP ' s; Previous behaviour is to the set path_translated to Script_filename;  What Path_info is.  For more information on Path_info, the "the CGI specs." Setting;  This to 1 would incorporated PHP CGI to fix its paths to conform to the spec. A setting;  of zero causes PHP to behave as unreported.  Default is 1. You should fix your scripts;  To use Script_filename rather than path_translated. ; Http://php.net/cgi.fix-pathinfo cgi.fix_pathinfo=1 [...]

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.