我想在XAMPP上运行Vhost,但是重定向到端口:8080。这里的问题是我在端口上运行IIS:80和端口上的Apache:8080这些是我的配置文件,试图在虚拟主机上运行我的proyect:
托管文件
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 www.goviaje.com
的httpd-vhosts.conf
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:8080
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot "C:/xampp/htdocs/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
##</VirtualHost>
<VirtualHost *:8080>
ServerAdmin localhost:8080
DocumentRoot "C:/xampp/htdocs"
ServerName localhost:8080
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "C:/xampp/htdocs/goviaje/"
ServerName www.goviaje.com:8080
ServerAlias goviaje.com:8080
<Directory "C:/xampp/htdocs/goviaje">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
启用httpd.conf中的所有必要模块
好的,当我在浏览器中输入“www.goviaje.com”时,它会将我发送到IIS主页(localhost:80),我需要转到 localhost:8080 / goviaje / < / p>
有人能帮助我吗?
答案 0 :(得分:4)
您必须使用www.goviaje.com:8080
作为网站网址才能访问Apache,因为默认HTTP端口为80,因此IIS正在为您的请求提供服务。当然,您也可以将IIS配置为转发代理。