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 - JQuery 验证远程和检查数据库 PHP MySQL 错误

mysql - 获取 mySQL 存储过程导致另一个存储过程

mysql - Pentaho - 报告未显示

mysql - PHP 中的 SQL 查询和输出不起作用 - 500 内部服务器错误

PHP-FPM 进程导致 VPS 上 CPU 使用率高

环境变量的 Apache 错误(Ubuntu)

PHP 正则表达式匹配标记前瞻问题

php 编码字符串,反之亦然

php - 如何从数据库的下拉菜单中插入ID

java - 让 Apache POI 在 Eclipse 上与 Java 配合使用 - 如何构建