本地 Windows 计算机的基本 Apache 命令
我已经在我的 Windows 7 计算机上安装了 XAMPP 并创建了许多虚拟服务器。这部分很简单。
每次添加新的虚拟服务器时,我都必须重新启动计算机才能重新启动 Apache 服务器,这当然非常耗时。
我在 google 上搜索并找到了用于重新启动 Apache 的正确控制台命令,但我找到的参考资料中绝对没有告诉您在哪里键入相关命令!假设有一定的知识水平。
所以我的问题是 - 我实际上在哪里输入 apache -k restart ?
I have installed XAMPP on my Windows 7 machine and created a number of virtual servers. This part is straightforward enough.
Each time I add a new virtual server I am having to reboot my computer in order to reboot the Apache server, which is of course quite time consuming.
I have googled and found the correct console commands to use to reboot Apache, but absolutely non of the references that I have found actually tell you where to type the relevant commands! A certain level of knowledge is assumed.
So my question is - where do I actually type apache -k restart
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在这里回到绝对的基础知识。本页上的答案和一点谷歌搜索使我对我的问题有了以下解决方案。
安装 Xampp 后重新启动 apache 服务的步骤:-
cd C:\xampp\apache\bin
(Xampp 的默认安装路径)httpd -k restart
我希望这对刚开始运行本地 Apache 的其他人有用服务器。
Going back to absolute basics here. The answers on this page and a little googling have brought me to the following resolution to my issue.
Steps to restart the apache service with Xampp installed:-
cd C:\xampp\apache\bin
(the default installation path for Xampp)httpd -k restart
I hope that this is of use to others just starting out with running a local Apache server.
对于经常使用此命令的情况,我发现将 C:\xampp\apache\bin 的位置添加到 PATH 中很容易。使用安装此文件的任何目录。
然后您可以从命令行中的任何目录运行:
上面的答案表明 httpd -k -restart 实际上是一个拼写错误。您可以通过运行
httpd /?
来查看命令For frequent uses of this command I found it easy to add the location of
C:\xampp\apache\bin
to thePATH
. Use whatever directory you have this installed in.Then you can run from any directory in command line:
The answer above that suggests httpd -k -restart is actually a typo. You can see the commands by running
httpd /?