You cannot access the PHP page, but there is no problem with static files. This may be a problem with your firewall settings.

Source: Internet
Author: User

Problem: I recently set up a new environment for my "Happy Tao". After the lnmp environment is installed, MySQL, PHP-FPM, and nginx are in normal state, but PHP programs cannot be accessed through nginx, access static pages
This problem has plagued me for several days and has finally made progress today.
Cause Analysis: iptables is usually set to one
Iptables-P input drop
However, the method for nginx to call FastCGI is to access 127.0.0.1: 9000.
 
Solution: add an iptables policy.
Iptables-A input-I lo-J accept
Explanation: Lo is the abbreviation of loopback, which means loopback. the IP address of the loopback interface is 127.0.0.1. The preceding policy allows data from the lo interface.
The corresponding iptables-A output-O lo-J accept allows sending data to the lo interface.

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.