Nginx + apache + php-fpm Configuration

Source: Internet
Author: User
Prepare for the installation. Install nginx and php first. We suggest you check out the installation article in www.phpcxz.com. let's talk about configuration in detail. First, configure apache. make sure that apache has the mod_fastcgi.so Module # configure apache to run phpScriptAliasfcgi-binusrlocalwebserverphpbin in php-cgi Mode. This is p.

Prepare for the installation. Install nginx and php first. We suggest you check out the installation article in www.phpcxz.com. let's talk about configuration in detail. First, configure apache. make sure that apache has the mod_fastcgi.so Module # configure apache to run phpScriptAlias/fcgi-bin/"/usr/local/webserver/php/bin/" this is p

Prepare for the installation. Install nginx and php first. We suggest you check out a detailed installation article in www.phpcxz.com. Let's talk about the configuration in detail.

Configure apache first. Make sure that apache has the mod_fastcgi.so module.

# Configure apache to run phpScriptAlias/fcgi-bin/"/usr/local/webserver/php/bin/" using php-cgi. This is the path of php-bin AddHandler php-fastcgi. php Action php-fastcgi/fcgi-bin/php-cgiAddType application/x-httpd-php. php
Finally, configure nginx to implement reverse proxy. Here we will focus on configuring the server.
Server {listen 80; server_name localhost; access_log/var/log/nginx/access. log; root/var/www; error_page 404/40 x.html; location =/40x.html {root html/404;} error_page 500 502 503 x.html; location =/50x.html {root html ;} location/{index. php index.html index.htm;} location ~ \. Php $ {proxy_pass http: // 127.0.0.1: 8080; # submit it to apache
# Other configurations} # submit images, CSS, and JS to Nginx for processing and cache them to the local location ~ * \. (Jpg | jpeg | gif | png) $ {access_log off; expires 30d ;}}
This configuration is fine. I will write down these for later viewing.

Original article address: nginx + apache + php-fpm configuration. Thank you for sharing it with me.

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.