When Apache is configured, index.php only displays the directory.

Source: Internet
Author: User
Hello everyone, my Apache and PHP configuration, localhost does not display the contents of index.php, but instead shows the list under the root directory, but I input localhost/phpinfo.php, but can display the content, this is what is the case, PHP is configured

LoadModule php5_module "D:/program files/php5.2/php5apache2_2.dll"
AddType application/x-httpd-php. php. Do action
AddType application/x-httpd-php. htm. html
Phpinidir "D:/program files/php5.2"


DirectoryIndex index.html index.php


Reply to discussion (solution)

Do not display the index list:
httpd.conf, find this line in the directory segment:
Options Indexes ...

Remove indexes and restart Apache

Are you sure you have a index.php file with the directory? is the Dir module loaded?

localhost/index.php Do you have content?

If you can, you can advance the index.php

DirectoryIndex index.php index.html

LoadModule Env_module modules/mod_env.so

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