0

我被困在这个403问题上。我在ubuntu上为apache设置了虚拟主机,当我访问该站点时,它返回403。

/etc/apache2/site-available/os.solesschong.com

<VirtualHost *>
    DocumentRoot /root/mysoft/sns
    ServerName oa.solesschong.com
    ErrorLog ${APACHE_LOG_DIR}/oa.solesschong.com-error.log
    CustomLog ${APACHE_LOG_DIR}/oa.solesschong.com-access.log combined
<Directory /root/mysoft/sns>
    Allow from all
</Directory>
</VirtualHost>

# a2enable oa.solesschong.com

文件

root/mysoft/sns/index.php

域名系统

oa.solesschong.com A-record: [IP of my server]

浏览器返回

Forbidden

You don't have permission to access / on this server.

Apache/2.2.22 (Ubuntu) Server at oa.solesschong.com Port 80
4

2 回答 2

2

Apache 进程是否具有读取 /root/mysoft/sns/index.php 的权限?

于 2013-10-26T05:06:27.820 回答
1

检查您的 apache 版本。如果是 2.4,那么您需要从以下更改配置

Allow from all

Require all granted
于 2013-10-26T04:41:33.663 回答