为什么修改xampp的默认端口号以后,点击admin不能访问网页是什么原因
展开全部
估计你修改的有问题,你再仔细看看
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增加代码
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
<Directory "c:/xampp/htdocs">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.php
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "c:/xampp/htdocs/tpshop"
ServerName localhost:8080
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
<Directory "c:/xampp/htdocs/tpshop">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.php
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
4
重启Apache
5
地址栏输入
localhost可以访问xampp
地址栏输入
localhost:8080
可以访问tpshop
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增加代码
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs"
ServerName localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
<Directory "c:/xampp/htdocs">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.php
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "c:/xampp/htdocs/tpshop"
ServerName localhost:8080
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
<Directory "c:/xampp/htdocs/tpshop">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.php
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
4
重启Apache
5
地址栏输入
localhost可以访问xampp
地址栏输入
localhost:8080
可以访问tpshop
Storm代理
2023-07-25 广告
2023-07-25 广告
StormProxies是一家国内优质海外HTTP代理商,拥有一个庞大的IP资源池,覆盖200多个地区,IP数量大且匿名度高。其优点还包括超高并发、稳定高效、技术服务等特点,同时提供HTTP、HTTPS以及SOCKS5协议支持。此外,Sto...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询