2015-01-13 70 views
0

我与Wamp服务器一起工作。今天我操纵httpd.config直接连接到目录。因为我删除了这一行,所以wamp服务器不会联机,在我切换到之前的状态并重新启动wamp后,它仍然处于脱机状态。我用Windows 7和Apache版本2.4.7wamp服务器不能上网

<Directory C:\wamp\www\Zend\workspaces\test\public> 

DirectoryIndex index.php 

AllowOverride All 

Order allow,deny 

Allow from all 

</Directory> 

</VirtualHost> 

回答

0

你能试试吗?


的DocumentRoot “C:/ WAMP/WWW/Zend公司/工作区”,从所有 #Require 服务器名local-portail.com 的DirectoryIndex index.php文件 #AllowOverride所有 #Allow所有授予

或本


的DocumentRoot “C:/ WAMP/WWW/Zend公司/工作区” 服务器名local-portail.com 的DirectoryIndex index.php文件 #AllowOverride所有 #Allow所有 #Require所有授予

<IfModule dir_module> 
    DirectoryIndex index.php 
</IfModule> 

+0

是的,但它不会改变。有可能恢复原始httpd.config而不重新安装wamp? – AFN

+0

我没有办法在没有任何颠覆程序的情况下恢复它。 但这里是一个解释如何重建你的wamp而不会丢失数据http://flowingmotion.jojordan.org/2013/07/19/12-steps-to-rebuild-your-wamp-server-without-losing-your-wamp-server-without-losing-your-数据/ – Brainstroming

0

这是您更改的httpd.conf部分吗?

<Directory "c:/wamp/www"> 
    # 
    # Possible values for the Options directive are "None", "All", 
    # or any combination of: 
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 
    # 
    # Note that "MultiViews" must be named *explicitly* --- "Options All" 
    # doesn't give it to you. 
    # 
    # The Options directive is both complicated and important. Please see 
    # http://httpd.apache.org/docs/2.4/mod/core.html#options 
    # for more information. 
    # 
    Options Indexes FollowSymLinks 

    # 
    # AllowOverride controls what directives may be placed in .htaccess files. 
    # It can be "All", "None", or any combination of the keywords: 
    # AllowOverride FileInfo AuthConfig Limit 
    # 
    AllowOverride All 

    # 
    # Controls who can get stuff from this server. 
    # 
# onlineoffline tag - don't remove 
    Order Deny,Allow 
    Deny from all 
    Allow from 127.0.0.1 
    Allow from ::1 
    Allow from localhost 
</Directory> 

如果你想使其他目录的根目录,然后更好的方法是创建一个虚拟主机,或许多虚拟主机,每一个项目。

看到这个职位如何做到这一点。忽略标题,这是一篇描述如何设置虚拟主机的文章。 Project Links do not work on Wamp Server