Access to the httpd - apache virtual directory is prohibited. Where is the error (conf file attached)?
黄舟
黄舟 2017-05-16 17:05:07
0
6
776
Alias /hc/ "/home/bitnami/hanchuan/htdoc" Alias /hc "/home/bitnami/hanchuan/htdoc"  AllowOverride None Order allow,deny Allow from all 

Visit http://alangs.info/hc or http://alangs.info/hc/index.php
They all reported the error of not having permission to access.
In fact, /home/bitnami/hanchuan/htdoc/index.php exists.
Where is the error?

The problem is solved.
Put: Order allow,deny
Change to: Order deny,allow
You can access it.
The strange thing is that other directories can be accessed without writing them like this.

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all (6)
小葫芦

@alang You should also start with the logs. You have already said that you have read the logs, but have you adjusted the LogLevel? The default level may not be enough.

-------------------------------------------------

Order order see:

The Order command controls the default access status and the order in which the Allow and Deny commands take effect. The Ordering value range is one of the following examples:

Deny, Allow The
Deny directive is evaluated before the Allow directive. All access is allowed by default. Any client that does not match the Deny directive or matches the Allow directive is allowed access.
Allow,Deny
Allow directive is evaluated before Deny directive. All access is denied by default. Any client that does not match the Allow directive or matches the Deny directive will be denied access.
… …

I saw this sentence in the manual:

Note: If there is a suffix "/" in the url-path, the server requires a suffix "/" to extend this alias. In other words, "Alias /icons/ /usr/local/apache/icons/" cannot alias "/icons".

Put
Alias /hc/ "/home/bitnami/hanchuan/htdoc"

Try removing it?
    洪涛

    chmod 755 /home/bitnami/hanchuan/htdoc Try it, it may be that this directory does not have read and write permissions for other users

      我想大声告诉你

      ls -l Check the properties and permissions of /home/bitnami/hanchuan/htdoc, and check the group and owner, because there may be problems in the home directory!

        我想大声告诉你

        Please see the error.log for these problems, it will tell you everything

          左手右手慢动作

          Check if it’s a problem with selinux and fix it

          setenforce 0

          Try again

            小葫芦

            Problem solved.
            Put: Order allow, deny
            Change to: Order deny,allow
            You can access it.
            The strange thing is that other directories can be accessed without writing them in this way.

              Latest Downloads
              More>
              Web Effects
              Website Source Code
              Website Materials
              Front End Template
              About us Disclaimer Sitemap
              php.cn:Public welfare online PHP training,Help PHP learners grow quickly!