用宝塔在win11安装了Apache,php,mysql的一些问题汇总 您所在的位置:网站首页 宝塔服务器是什么 用宝塔在win11安装了Apache,php,mysql的一些问题汇总

用宝塔在win11安装了Apache,php,mysql的一些问题汇总

2023-07-06 04:00| 来源: 网络整理| 查看: 265

大部分是查看别人的好文章的,感谢一下:

网页访问出现 no input file specified 发现在网站根目录user.ini作怪,注释掉就好了。

或者干脆不要这个文件。

配置httpd-vhosts.conf文件 该文件的路径是Apache24/conf/extra/httpd-vhosts.conf.

请找到这个文件的末尾,配置VirturalHost部分。先把给的两个例子注释掉,然后添加自己的内容。最后的结果是这样的:

# #ServerAdmin [email protected] #DocumentRoot “${SRVROOT}/docs/dummy-host.example.com” #ServerName dummy-host.example.com #ServerAlias www.dummy-host.example.com #ErrorLog “logs/dummy-host.example.com-error.log” #CustomLog “logs/dummy-host.example.com-access.log” common #

# #ServerAdmin [email protected] #DocumentRoot “${SRVROOT}/docs/dummy-host2.example.com” #ServerName dummy-host2.example.com #ErrorLog “logs/dummy-host2.example.com-error.log” #CustomLog “logs/dummy-host2.example.com-access.log” common #

#Options FollowSymLinks AllowOverride All Order allow,deny Allow from all Require all granted #ServerAdmin [email protected] DocumentRoot “D:\wwwroot\127.0.0.1” ServerName localhost:80 DirectoryIndex index.html

PHP配置: (1)将 PHP 的根目录下的 php.ini-development 复制一份并改名为 php.ini,有时候看到已经有了。 (2)打开php.ini文件:extension_dir = “${phphome}\ext” 修改成ext的绝对路径,并且去掉前面的分号。 修改后类似这样 : extension_dir = “D:/BtSoft/php/74”

有时候能用127.0.0.1访问 不能用IP访问,直接使用本地IP地址添加一个网站,目录设置一下竟然访问正常

20230628在多台win11电脑安装了宝塔面板,发现上述问题主要是解决user.in的作怪,解决使用局域网IP开站点设置基本上就解决问题了,还发现一个比较严重的问题,就是有几次发现访问特别慢的情况,通过C#编程测试,访问一次需要2秒左右,正常在10ms左右,经过测试是mysql版本引起的,宝塔默认安装是musql4.2版本,更换到8.0版的mysql问题就解决了

安装redis。在宝塔面板->软件商店中找到redis,确认其已经安装。

安装redis扩展/: 在宝塔面板->软件商店中找到:PHP版本->设置->安装扩展->redis扩展,选择安装即可。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有