Windows安装laravel出现You don't have permission to access / on this server.
2017-05-16 11:07
519 查看
安装完wamp之后,安装网上的教程设置虚拟路径,出现了问题,同样的问题由不同的原因导致。希望对有些大意的人有帮助。
1、httpd.conf去掉Include conf/extra/httpd-vhosts.conf前面的#。
2、httpd.conf中添加Listen 相应的端口,我的是8080
3、在conf\extra下面的httpd-vhosts.conf文件中添加
<VirtualHost *:8080>
DocumentRoot D:/wamp/www/aa
ServerName localhost
<Directory “d:/wamp/www/aa”>
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
4、然后调用localhost,就出现下面的错误:
(没有设置这一切时,localhost访问的没有问题的)
5、最后发现是没有删掉httpd-vhosts.conf文件中的这段代码导致的:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot “c:/Apache23/docs/dummy-host.example.com”
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog “logs/dummy-host.example.com-error.log”
CustomLog “logs/dummy-host.example.com-access.log” common
</VirtualHost>
删掉或者注释掉这段代码,再运行localhost就没有问题了。
6、localhost运行好使了,但运行localhost:8080却有新的问题:
7、然后也是找了很多,多是说什么allow from all等等的问题。但无论我怎么设置都是这个问题。
几经波折,发现把Options Indexes FollowSymLinks 后面添加上 ExecCGI就好使了。
<VirtualHost *:8080>
DocumentRoot D:/wamp/www/aa
ServerName localhost
<Directory “d:/wamp/www/aa”>
Options Indexes FollowSymLinks ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
1、httpd.conf去掉Include conf/extra/httpd-vhosts.conf前面的#。
2、httpd.conf中添加Listen 相应的端口,我的是8080
3、在conf\extra下面的httpd-vhosts.conf文件中添加
<VirtualHost *:8080>
DocumentRoot D:/wamp/www/aa
ServerName localhost
<Directory “d:/wamp/www/aa”>
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
4、然后调用localhost,就出现下面的错误:
Forbidden
You don’t have permission to access /on this server.(没有设置这一切时,localhost访问的没有问题的)
5、最后发现是没有删掉httpd-vhosts.conf文件中的这段代码导致的:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot “c:/Apache23/docs/dummy-host.example.com”
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog “logs/dummy-host.example.com-error.log”
CustomLog “logs/dummy-host.example.com-access.log” common
</VirtualHost>
删掉或者注释掉这段代码,再运行localhost就没有问题了。
6、localhost运行好使了,但运行localhost:8080却有新的问题:
Forbidden
You don’t have permission to access /index.phpon this server.7、然后也是找了很多,多是说什么allow from all等等的问题。但无论我怎么设置都是这个问题。
几经波折,发现把Options Indexes FollowSymLinks 后面添加上 ExecCGI就好使了。
<VirtualHost *:8080>
DocumentRoot D:/wamp/www/aa
ServerName localhost
<Directory “d:/wamp/www/aa”>
Options Indexes FollowSymLinks ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
相关文章推荐
- (wordpress安装)针对WampServer出现You don't have permission to access /phpmyadmin/ on this server.
- WampSever 远程访问出现Forbidden You don’t have permission to access / on this server.解决方法
- apache默认配置 访问目录403错误 出现You don't have permission to access / on this server
- wamp中访问http出现You don’t have permission to access/on this server提示
- wamp出现You don’t have permission to access/on this server提示
- apache出现You don’t have permission to access / on this server问题的解决
- CentOS7.0下安装Apache2.4.20版本,安装完成之后,报 You don't have permission to access / on this server.
- phpstudy切换php高版本出现You don't have permission to access xxx on this server.
- wamp出现You don’t have permission to access/on this server提示
- phpStudy出现You don't have permission to access / on this server.
- apache出现You don't have permission to access / on this server. 提示
- WampServer设置apache伪静态出现404 not found及You don't have permission to access / on this server解决方法分析[原创]_服务器其它_脚本之家
- wampserver出现You don&#39;t have permission to access / on this server.
- Apache刚装好重启出现You don't have permission to access / on this server. 错误的解决办法
- wamp出现You don’t have permission to access/on this server提示
- Wamp 修改默认网站目录的方法及出现You don't have permission to access / on this server问题解决
- php错误:访问网页出现Forbidden you donnot have permission to access … on this server
- wamp出现You don’t have permission to access/on this server提示
- CentOS7.0下安装Apache2.4.20版本,安装完成之后,报 You don't have permission to access / on this server.
- 安装PHP报You don't have permission to access /test.php on this server.怎C样解决