如何在 localhost:8000 上从 运行 停止 VirtualBox?

How do I stop VirtualBox from running on localhost:8000?

如标题,简单(但不禁用VM机器)。到处寻找,但找不到答案。

我有一台 Vbox 机器 运行 Laravel 但需要 Symfony 改用 127.0.0.1:8000。我刚刚在那个地址上找到了我的 Laravel 网站之一,但它们发生了冲突。

只需右键单击并在 vm 上 select 设置。转到网络选项卡并选择您的适配器。单击高级,您必须看到 'Port Forwarding' 在那里您可以更改端口。

当你重新启动电脑或运行 Vbox时,它会一次又一次地保持运行ning。 我建议你更改 prot which symfony 运行s

httpd.conf 你可以这样做

# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8085

# This is the configuration for your project
Listen 127.0.0.1:8085

<VirtualHost 127.0.0.1:8085>
  DocumentRoot "/home/sfproject/web"
  DirectoryIndex index.php
  <Directory "/home/sfproject/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf /home/sfproject/lib/vendor/symfony/data/web/sf
  <Directory "/home/sfproject/lib/vendor/symfony/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

阅读这些

  1. How to Use PHP's built-in Web Server
  2. Chapter 3 - Running Symfony

Not be the answer. Just an tip