dourui9570
2016-10-26 05:06
浏览 68
已采纳

启用虚拟主机后,Wamp目录无法正常工作

I have created a virtual host for a new application in wamp.

In my httpd.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf  //<--- Removed #

In my httpd.vhosts.conf I added a new host

<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  DocumentRoot "C:/wamp/www/myapp"
  ServerName myapp.local
  ServerAlias 127.0.0.1
  SetEnv APPLICATION_ENV "development"
  <Directory "C:/wamp/www/myapp/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
  </Directory>
</VirtualHost>

The virtual host is working fine. But the problem is my other apps that run without virtual hosts are not working.

When i open http://localhost/fistapp/ it shows

Forbidden 403

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

图片转代码服务由CSDN问答提供 功能建议

我已经为wamp中的新应用程序创建了一个虚拟主机。</ p>

在我的 httpd.conf </ code> </ p>

  #Virtual hosts 
Include conf / extra / httpd-vhosts.conf //&lt; --- Removed#\  n </ code> </ pre> 
 
 

在我的 httpd.vhosts.conf </ code>中我添加了一个新主机</ p>

 &lt  ; VirtualHost *:80&gt; 
 ServerAdmin webmaster @ localhost 
 DocumentRoot“C:/ wamp / www / myapp”
 ServerName myapp.local 
 ServerAlias 127.0.0.1 
 SetEnv APPLICATION_ENV“development”
&lt; Directory“  C:/ wamp / www / myapp /“&gt; 
选项索引FollowSymLinks MultiViews 
 AllowOverride all 
&lt; / Directory&gt; 
&lt; / VirtualHost&gt; 
 </ code> </ pre> 
 
 <  p>虚拟主机工作正常。 但问题是我在没有虚拟主机的情况下运行的其他应用程序无效。</ p> 
 
 

当我打开 http:// localhost / fistapp / </ code>时显示</ p >

  Forbidden 403 
 
您无权访问此服务器上的/。
 </ code> </ pre> 
 </ div>

1条回答 默认 最新

相关推荐 更多相似问题