php - 我在 WAMP 安装的 httpd.conf 中输入了错误的信息...

标签 php mysql apache wamp

我刚刚在 64 位 Windows 8.1 操作系统上安装了 WAMP。我更改了 httpd.conf 文件中显然有错误的部分。我尝试按照 YouTube 视频中的说明进行操作,但我确实对 WAMP 或 PHP 不太了解。我只是想开始。我必须如何更改以下信息才能使 Wamp 正常工作。

我刚刚安装了它,由于它不起作用,我遵循了在网上找到的一些常见建议,并尝试进行一些更改,但什么也没发生。

我还看到有一个 httpd.conf.build 文件,其信​​息与 httpd.conf 文件本身不同。

如果我刚刚在 Windows 8.1 上安装了 WAMP,并且只进行了我在下面共享的更改...我如何让我的本地服务器正常工作,以便我可以在本地驱动器上测试 PHP 软件。

我真的不知道该怎么办。我刚刚开始使用 PHP,甚至无法让 WAMP 运行(当它应该是自动安装时)。

我认为我在正确的地方提出了这个问题,因为我为自己提出了一些自定义问题,所以我无法想象其他人会问这个完全相同的问题。如果我刚刚安装了 WAMP,并且只对原始文件进行了下面概述的更改,那么我是如何搞砸的以及如何才能运行我的 WAMP 安装呢?

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78
Listen 0.0.0.0
Listen 8888

80 Dynamic Shared Object (DSO) Support

最佳答案

这就是 httpd.conf 文件的该部分的样子

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 0.0.0.0:80
Listen [::0]:80

#
# Dynamic Shared Object (DSO) Support

在您知道自己在做什么之前,我建议您在尝试更改任何配置文件之前先对其进行备份。

如果您确实想将 APache 移动到监听端口 8888,我建议您不要这样做。相反,找出还有什么正在使用端口 80 并重新配置它。

但是如果您必须尝试对 httpd.conf 进行这些更改

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 0.0.0.0:8080
Listen [::0]:8080

#
# Dynamic Shared Object (DSO) Support

然后找到该行

ServerName localhost:80

并将其更改为

ServerName localhost:8080

关于php - 我在 WAMP 安装的 httpd.conf 中输入了错误的信息...,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26769847/

相关文章:

php - 在 htaccess 中禁用 php 函数

java - HTTP 状态 500 - 实例化 servlet 类 com.sar.pkg.MyServlet 时出错

javascript - register_sidebar() WordPress 与 Bootstrap 3 崩溃

php - 如何避免 Error: PDOStatement::execute(): MySQL server has gone away in Yii?

php - Composer 可以在不实际下载软件包的情况下生成 `composer.lock` 吗?

MySQL 查询结果为所需格式

c++ mysql在数据库中插入

php - 为什么这个php和MySQL不显示结果

php - 谷歌地图中的递归太多

php - UTF-8贯穿始终