永发信息网

为什么修改xampp的默认端口号以后,点击admin不能访问网页是什么原因

答案:1  悬赏:80  手机版
解决时间 2021-12-23 01:29
  • 提问者网友:练爱
  • 2021-12-22 06:30
为什么修改xampp的默认端口号以后,点击admin不能访问网页是什么原因
最佳答案
  • 五星知识达人网友:等灯
  • 2021-12-22 07:09
估计你修改的有问题,你再仔细看看
1
找到C:\Windows\System32\drivers\etc 下的
hosts文件
增加以下代码:
127.0.0.1 localhost
127.0.0.1 localhost:8080
2
找到c:\xampp\apache\conf 下的
httpd.conf
将Include conf/extra/httpd-v前面的#去掉变成
Include conf/extra/httpd-vhosts.conf
增加两行代码
Listen 8080
NameVirtualHost localhost:8080
3
找到c:\xampp\apache\conf\extra下的
httpd-vhosts.conf增加代码

DocumentRoot "c:/xampp/htdocs"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common

Options Indexes FollowSymLinks
DirectoryIndex index.html index.php
AllowOverride all
Order allow,deny
Allow from all



DocumentRoot "c:/xampp/htdocs/tpshop"
ServerName localhost:8080
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common

Options Indexes FollowSymLinks
DirectoryIndex index.html index.php
AllowOverride all
Order allow,deny
Allow from all


4
重启Apache
5
地址栏输入
localhost可以访问xampp
地址栏输入
localhost:8080
可以访问tpshop
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯