snake_l 发表于 2017-1-9 08:44:55

新安装的Apache修改默认监听端口

  系统:Win8.1,X64
  安装文件: httpd-2.2.25-win32-x86-no_ssl.msi
  安装完毕后,根目录在:C:\Program Files (x86)\Apache Software Foundation\Apache2.2
  需要做的步骤是修改Apache的默认监听端口,在哪?在根目录的conf文件夹的httpd.conf文件中修改。
  遇到了问题!没有权限修改这个用记事本打开的文件,也就是修改了httpd.conf不能保存,提示“拒绝访问”!
  分析:没有写权限。
  解决:把根目录全部加入可修改的权限,右键单击Apache2.2:
  

  给Users角色加入所有权限,确认。问题解决。
  然后修改监听端口:
   搜80,找到下面一段,修改80到8080:

#
# 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 8080
   
页: [1]
查看完整版本: 新安装的Apache修改默认监听端口