nginx-php-Server-nginx+php: The PHP file can be interpreted correctly, but the link to the PHP page will be 404 or directly display the file list of the directory where the PHP files are located

Source: Internet
Author: User
Tags drupal
Nginx has been able to interpret PHP files correctly.
If there is index.php,nginx in a directory that does not automatically load index.php, manual clicks can be interpreted correctly.
However, clicking on WordPress index.php will show you the list of files in the WordPress directory directly.
If you click on Drupal's index.php, the page will display correctly, but if you click on such a drupal/index.php/node/add link, you'll be prompted with a 404 error.

Reply content:

Nginx has been able to interpret PHP files correctly.
If there is index.php,nginx in a directory that does not automatically load index.php, manual clicks can be interpreted correctly.
However, clicking on WordPress index.php will show you the list of files in the WordPress directory directly.
If you click on Drupal's index.php, the page will display correctly, but if you click on such a drupal/index.php/node/add link, you'll be prompted with a 404 error.

This situation is basically your rewrite is not configured well, or Nginx rewrite configuration and your WordPress permanent link configuration inconsistent caused by the

root index.php index.html index.htmare there any settings in your nginx configuration?

You should be without installing PHP-FPM

Nginx itself does not support PathInfo mode, you must first let your nginx environment support PathInfo.

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