天天看點

You don‘t have permission to access on this server.

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

使用WampServer遇到的一個坑: 服務啟動後始終無法進入頁面,提示我“You don't have permission to access ../....on this server.”開始在網上搜尋了,都說是httpd.conf的問題,但是反複改了還是不對,後來嘗試改了extra/httpd-vhosts才終于解決:

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  ServerName 51tao.club
  
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Allow from all
  </Directory>
</VirtualHost>
           

需要添加一套<VirtualHost *:80>,并将ServerName 改成你的域名就可以了