0
<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 权限:/home/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 禁止。为什么?如何成功创建虚拟目录?

4

1 回答 1

1

可能是因为父文件夹的权限应该是固定的。

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

于 2012-06-29T08:34:30.753 回答