Apache 虚拟主机被重定向到本地主机
我无法使用XAMMP创建虚拟主机。虚拟主机始终重定向到本地主机。例如,当我键入mysite.local时,将重定向到localhost/mysite。下面是我的主机和apache配置:Apache 虚拟主机被重定向到本地主机,apache,xampp,Apache,Xampp,我无法使用XAMMP创建虚拟主机。虚拟主机始终重定向到本地主机。例如,当我键入mysite.local时,将重定向到localhost/mysite。下面是我的主机和apache配置: etc/主持人 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost 127.0.0.1 mysite.local /Applicati
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 mysite.local
NameVirtualHost *:80
# localhost
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName mysite.local
ServerAlias mysite.local *.lancome.local
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/mysite"
<Directory "/Applications/XAMPP/xamppfiles/htdocs/mysite">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs/webshop_moscow/trunk"
ServerName bos.webshop.local
<Directory "D:/xampp/htdocs/webshop_moscow/trunk">
# Order allow,deny
# Allow from all
Require all granted
</Directory>
</VirtualHost>
NameVirtualHost*:80
#本地主机
服务器名本地主机
DocumentRoot“/应用程序/XAMPP/xamppfiles/htdocs”
ServerName mysite.local
ServerAlias mysite.local*.lancome.local
DocumentRoot“/Applications/XAMPP/xamppfiles/htdocs/mysite”
选项索引如下SYMLINKS包括execCGI
允许超越所有
要求所有授权
NameVirtualHost *:80
# localhost
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName mysite.local
ServerAlias mysite.local *.lancome.local
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/mysite"
<Directory "/Applications/XAMPP/xamppfiles/htdocs/mysite">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:/xampp/htdocs/webshop_moscow/trunk"
ServerName bos.webshop.local
<Directory "D:/xampp/htdocs/webshop_moscow/trunk">
# Order allow,deny
# Allow from all
Require all granted
</Directory>
</VirtualHost>
是否在
/mysite
文件夹中有.htaccess
文件?是的,我在/mysite文件夹中有.htaccess。这是magento 2项目