【发布时间】:2015-11-08 14:08:24
【问题描述】:
当我将计算机升级到 Windows 10 时,Xampp 出现错误,它说我的 80 端口正在被 4 pid 监听。我找不到合适的服务来关闭。我搜索了很多网站,但我在互联网上看到的所有服务都已经在我的计算机上关闭。所以我不得不将我的端口更改为 localhost:8080。但此时我无法管理我的虚拟主机工作。任何形式的帮助提前谢谢你。这是我的一些与问题相关的文件:httpd.conf、httpd-vhosts.conf、httpd-ssl.conf 和主机
httpd.conf:
Listen 8080
httpd-vhosts.conf:
##ABC
NameVirtualHost *:8080
<VirtualHost *:8080>
DocumentRoot D:\xampp\htdocs\abc
ServerName abc.local
ErrorLog D:\xampp/apache/logs/fiori-error_log
CustomLog D:\xampp/apache/logs/fiori-access_log common
<Directory "D:\xampp\htdocs\abc">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
httpd-ssl.conf:
Listen 443
主机:
127.0.0.1 localhost
127.0.0.1:8080 abc.local
【问题讨论】:
-
您是否尝试在浏览器中访问localhost:8080?我不认为您可以通过主机文件重定向到其他端口。
-
是的,我当然可以在 localhost:8080 上运行我的项目。但我想像 htttp://abc.local 这样运行我的项目,因为我正在通过版本控制系统与我的朋友一起工作,我不想总是将此行更改为 localhost:8080。
标签: apache xampp localhost virtualhost windows-10