When learning PHP, Apache accesses *php, but cannot access folders

Source: Internet
Author: User
When you learn PHP, you can access *.php with Apache, but you can't access folders
When you learn PHP, you can access *.php with Apache, but you won't be able to access folders such as localhost, and you'll see the following information:

Forbidden

You don't have permission to access/on the this server.
apache/2.0.59 (WIN32) php/5.1.6 Server at localhost Port 80

But visit localhost/test.php can, on the internet also looked at other people's solution

Options FollowSymLinks
AllowOverride None
Order Deny,allow
Deny from all

Change it here.

Options Indexes FollowSymLinks
AllowOverride None


According to the above changes, the problem is still unresolved,

------Solution--------------------
Add the following two sentences:
Order Allow,deny
Allow from all
------Solution--------------------
References:
Quote: References:

Add the following two sentences:
Order Allow,deny
allow from all

Add also not, here is my httpt.conf file, please help to look


#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# Configuration directives that give the server its instructions.
# See For detailed information about
# the directives.
#
# do not simply read the instructions in here without understanding
# What they does. They ' re here is only as hints or reminders. If you are unsure
# Consult the online docs. You have been warned.
#
# The configuration directives is grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# Whole (the ' Global Environment ').
# 2. Directives that define the parameters of the ' main ' or ' default ' server,
# which responds to requests this aren ' t handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow WEB requests to being sent to
# different IP addresses or hostnames and has them handled by the
# same Apache server process.
#
# Configuration and logfile names:if the filenames you specify for many
# of the server ' s control files begin with "/" (or "drive:/" for Win32), the
# Server would use this explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot are prepended--so "logs/foo.log"
# with ServerRoot set to "C:/Program Files/apache group/apache2" would be interpreted by the
# server as "C:/Program Files/apache group/apache2/logs/foo.log".
#
# Note:where Filenames is specified, you must use forward slashes
# instead of backslashes (e.g, "c:/apache" instead of "C:\apache").
# If A drive letter are omitted, the drive on which Apache.exe is located
# would be used by default. It's recommended that's always supply
# Explicit drive letter in absolute paths, however, to avoid
# confusion.
#

# # # section 1:global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# serverroot:the top of the directory tree under which the server ' s
# Configuration, error, and log files are kept.
#
# note! If you intend to place this on an NFS (or otherwise network)
# mounted FileSystem then please read the LockFile documentation (available
# at );
# You'll save yourself a lot of trouble.
  • 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.