最新消息:XAMPP默认安装之后是很不安全的,我们只需要点击左方菜单的 "安全"选项,按照向导操作即可完成安全设置。

XAMPP下载配置与xampp-control.ini文件无法打开的问题_apache端口被占用

XAMPP教程 admin 445浏览 0评论

XAMPP下载配置与XAMPP-CONTROL.INI文件无法打开的问题_apache端口被占用

XAMPP下载

[百度网盘]Download XAMPP软件下载安装

安装

安装过程比较简单,一路next就好
安装好后,点击start,如果都是绿色,则成功
但更多时候会遇到端口冲突的问题
ex0000024

APACHE端口占用

apche启动提示

Apache启动提示
10:33:43  [Apache]Problem detected!
10:33:43  [Apache]Port 80 in use by "Unable to open process" with PID 4!
10:33:43  [Apache]Apache WILL NOT start without the configured ports free!
10:33:43  [Apache] Youneed to uninstall/disable/reconfigure the blocking application
10:33:43  [Apache] orreconfigure Apache and the Control Panel to listen on a different port
10:33:43  [Apache]Problem detected!
10:33:43  [Apache]Port 443 in use by ""C:\Program Files (x86)\VMware\VMwareWorkstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml""with PID 5728!
10:33:43  [Apache]Apache WILL NOT start without the configured ports free!
10:33:43  [Apache] Youneed to uninstall/disable/reconfigure the blocking application
10:33:43  [Apache] orreconfigure Apache and the Control Panel to listen on a different port

在xampp根目录下有两个个文件properties.ini和xampp-control.ini

  1. 打开properties.ini,找到
[General]
installdir=D:\xampp
base_stack_name=XAMPP
base_stack_version=1.8.3-1
base_stack_platform=windows
require_root_privileges=1
[Apache]
apache_server_port=80
apache_server_ssl_port=443
apache_root_directory=/xampp/apache
apache_htdocs_directory=D:\xampp/htdocs
apache_domainname=127.0.0.1
apache_configuration_directory=D:\xampp/apache/conf
apache_unique_service_name=

将 80 修改为 8001 ;将 443 修改为 4431

apache_server_port=8001
apache_server_ssl_port=4431
  1. 打开xampp-control.ini
    找到
[ServicePorts]
Apache=80
ApacheSSL=443
MySQL=3306
FileZilla=21

修改成

Apache=8001
ApacheSSL=4431

xampp-control.ini 文件 也可以 通过 config–>service and port settings–>apache

ex00000024

ex23

ex023

 


重新启动还是报错

17:05:33  [Apache] Error: Apache shutdown unexpectedly.
17:05:33  [Apache] This may be due to a blocked port, missing dependencies, 
17:05:33  [Apache] improper privileges, a crash, or a shutdown by another method.
17:05:33  [Apache] Check the "/xampp/apache/logs/error.log" file
17:05:33  [Apache] and the Windows Event Viewer for more clues

其实还是端口被占用的问题

  1. 到这个目录下\ xampp\apache\conf ,打开httpd.conf,将里边的80端口全部改成一个未被占用的端口,比如8001
  2. 到这个目录 \ xampp\apache\conf\extra ,打开httpd-ssl.conf ,将文件里的443端口全部换成一个未被占用的端口,比如4431

(可以notepad打开,ctrl+F搜索80 or 443)
(80要修改的有3处,443需要修改的有2处)

这两步也可以在Apache下选择这两个修改

ex0023

重新启动,成功~

XAMPP-CONTROL.INI文件拒绝访问的问题

安装的时候题提示 Error:Cannot create file “C:\xampp\xampp-control.ini”. Access denied.
后面修改config的时候也这样提示

  • 可以使用管理员身份运行
  • 也可以修改这个ini文件的安全性
    ==>文件上右键属性里面看看安全选项,设置下权限,要设置为当前的用户可以完全控制的权限

TOMCAT的无法运行问题

错误:

11:14:06  [Tomcat] 	Tomcat Started/Stopped with errors, return code: 1
11:14:06  [Tomcat] 	Make sure you have Java JDK or JRE installed and the required ports are free
11:14:06  [Tomcat] 	Check the "/xampp/tomcat/logs" folder for more information
11:38:24  [Tomcat] 	Attempting to start Tomcat app...
11:38:39  [Tomcat] 	Tomcat Started/Stopped with errors, return code: 1
11:38:39  [Tomcat] 	Make sure you have Java JDK or JRE installed and the required ports are free
11:38:39  [Tomcat] 	Check the "/xampp/tomcat/logs" folder for more information

可以参考:


之前使用过jdk,所以环境变量部分没问题
之前用过Tomcat,还修改过一些东西,可能因此产生了好多奇奇怪怪的问题

运行tomcat,出现问题:

D:\Applications\XMAPP\soft\tomcat\bin>startup.bat
The CATALINA_HOME environment variable is not defined correctly
This environment variable is needed to run this program

查看环境变量”CATALINA_HOME”发现其位置不在电脑上,猜测可能是之前tomcat的安装位置
ex000023
修改其位置到XMAPP下的tomcat里,(我xmapp的安装位置就在D:\Applications\XMAPP\soft,不是xmapp下有个文件夹 叫 soft……)
Using CATALINA_BASE: “D:\Applications\XMAPP\soft\tomcat”
Using CATALINA_HOME: “D:\Applications\XMAPP\soft\tomcat”
Using CATALINA_TMPDIR: “D:\Applications\XMAPP\soft\tomcat\temp”
Using JRE_HOME: “C:\Program Files\Java\jdk1.8.0_31”
Using CLASSPATH: “D:\Applications\XMAPP\soft\tomcat\bin\bootstrap.jar;D:\Applications\XMAPP\soft\tomcat\bin\tomcat-juli.jar”


之后运行还是出错,后来午睡完重新打开电脑,就好了~
所以如果所有方法都尝试过,不妨重启试试~
ex00023

转载请注明:XAMPP中文组官网 » XAMPP下载配置与xampp-control.ini文件无法打开的问题_apache端口被占用

您必须 登录 才能发表评论!