简体   繁体   中英

Apache virtualhost 403

I'm stuck on this 403 problem. I set up virtual host for apache on ubuntu, and when I access the site, it returns 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

file

root/mysoft/sns/index.php

DNS

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

browser return

Forbidden

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

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

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

Check your version of apache. If it is 2.4 then you need change alow configuration from

Allow from all

to

Require all granted

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM