apache403禁止您无权访问

时间:2012-06-29 08:24:28

标签: apache web-development-server

<VirtualHost *:80>
    ServerAdmin python@v.python.centos
    DocumentRoot "/var/www/vhost1/documents"
    ServerName v.python.centos
    ServerAlias www.v.python.centos.com

    ErrorLog "logs/v.python.centos-error_log"
    CustomLog "logs/v.python.centos-access_log" common

    <Directory /var/www/vhost1/documents>
        Order allow,deny
        Allow from all
    </Directory>

    WSGIDaemonProcess v.python.centos processes=1 threads=2 display-name=%{GROUP}
    WSGIProcessGroup v.python.centos

    WSGIScriptAlias /app /var/www/vhost1/wsgi-scripts/myapp.wsgi
    <Directory /var/www/vhost1/wsgi-scripts>
        Order allow,deny
        Allow from all
    </Directory>

    Alias /django-tjob /var/www/vhost1/djproject
    <Directory /var/www/vhost1/djproject>
        Order allow,deny
        Allow from all
    </Directory>

    Alias /django-jobs /home/python/djproject
    <Directory /home/python/djproject>
       Order allow,deny
       Allow from all
    </Directory>

</VirtualHost>

用户:python 允许: /家庭/蟒/ djproject

drwxrwxr-x.  6 python python    4096 Jun 29 14:35 djproject

的/ var / WWW / VHOST1 / djproject

drwxr-xr-x. 6 root root 4096 Jun 29 14:31 djproject
“/ var / www / vhost1 / documents”和“/ var / www / vhost1 / wsgi-scripts”中的

文件可以成功访问,但是“/ home / python / djproject”和新文件夹“/ var / www / vhost1 / djproject“禁止403。为什么? 如何成功创建虚拟目录?

1 个答案:

答案 0 :(得分:1)

可能是因为permissions on a parent folder should be fixed

IE中。无法遍历/ home或/ home / python。