Configure Nginx + PHP in Fedora18

Source: Internet
Author: User
Configure Nginx + PHP1 under Fedora18: Install nginxyuminstallnginx2: Install phpyuminstallphp3: Install php-fpmyuminstallphp-fpm4: Configure connection nginx open nginx. conf, comment out the above Code note fastcgi_paramSCRIPT_FILENAME is the php Location Path fast

Configure Nginx + PHP in Fedora 18

1: Install nginx

Yum install nginx

2: install php

Yum install php

3: install php-fpm

Yum install php-fpm

4: Configure nginx connection

Open nginx. conf

,

Comment out the above Code

Note that fastcgi_param SCRIPT_FILENAME is the php location path.

Fastcgi_pass: port 9000 is the port for communication between nginx and fastcgi.

5: Configure php-fpm

Open/etc/php-fpm.d/www. conf

Port consistency

6: Enable nginx and php-fpm

/Sbin/nginx

Php-fpm-R

7. Create an index. php file in the nginx working directory.

Enter code

Phpinfo ();
?>

Open the browser and enter localhost/index. php.

Get it done, close the job, don't compile it by yourself, it's really convenient to use yum

However, one result of this is that nginx cannot be customized, and the performance will naturally be much weaker. If you really need to consider large concurrency, you may wish to carefully study various extensions of php, as well as nginx, compile custom language extensions. In this way, the performance will be improved a lot!

For more information about Fedora, see Fedora topics page http://www.linuxidc.com/topicnews.aspx? Tid = 5

Related Article

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.