本文介绍了为什么 wamp server put online/offline 选项不见了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Windows 8.最近我安装了 wampserver3_x86_apache2.4.17_mysql5.7.9_php5.6.15.但是缺少在线/离线选项.我做了 wamp 管理器-> wamp 设置-> 在线/离线菜单项.它也不起作用.此选项旁边的绿色标记没有绿色.

I'm using windows 8. recently i've installed wampserver3_x86_apache2.4.17_mysql5.7.9_php5.6.15. but the put online/offlline option is missing. I did wamp manager->wamp settings->menus item online/offline. it doesn't work also. there is no green the green mark beside this option.

怎么办?

推荐答案

它不缺,现在是一个可选菜单

Its not missing it is now an optional menu

右键Wampmanager -> WAMPSetting -> 菜单项:在线/离线

Right click Wampmanager -> WAMPSetting -> Menu Item: Online/Offline

如果你点击它,旁边有一个勾号,你会在左键点击菜单上看到Online/Offline菜单.

If you click it so there is a Tick beside it, you will see the Online/Offline menu on the left click menu.

然而,由于它的用途已不复存在,因此它成为可选的.

您应该为每个项目创建虚拟主机,然后您可以单独修改每个虚拟主机以控制 Apache 访问规则.

You should create Virtual Hosts for each of your projects, then you can amend each of those individually to control the Apache access rules.

事实上,在 WAMPServer 3 或更高版本中,为 localhost 定义了一个虚拟主机,所以这个旧的 Online/Offline 进程实际上不会做你想做的事.

In fact in WAMPServer 3 or greater, there is a Virtual Host defined for localhost so this old Online/Offline process wont actually do what you want.

您现在必须转到 wamp\bin\apache\apache{version}\conf\extra\httpd-vhosts.conf 文件并手动修改该条目

You now have to go to the wamp\bin\apache\apache{version}\conf\extra\httpd-vhosts.conf file and manually amend that entry

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot D:/wamp/www
    <Directory  "D:/wamp/www/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted                  #<-- changed line
    </Directory>
</VirtualHost>

可以像这样使用 wampmanager 菜单编辑此文件

This file can be edited using the wampmanager menus like this

wampmanager -> Apache -> httpd-vhosts.conf

但是,不推荐允许这种对本地主机的访问.最好为每个项目创建一个虚拟主机,例如

However it is not recommended to allow this sort of access to localhost. It is better to create a Virtual Hosts for each of your projects eg

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot D:/wamp/www
    <Directory  "D:/wamp/www/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName project1.dev
    DocumentRoot D:/wamp/www/project1
    <Directory  "D:/wamp/www/project1">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

这篇关于为什么 wamp server put online/offline 选项不见了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 14:06