![](/img/trans.png)
[英]What is the appropriate virtual host for this apache2.4 and laravel setup?
[英]How to add public virtual host in Apache 2.4 with WAMP
我有一个Apache服务器,该服务器可以在端口8080上处理两个虚拟主机,一个是私有(localhost),第二个是公共(internet)。 私有虚拟主机工作正常,但是公共不断将所有公共请求重定向到本地主机,我不确定自己在做什么错。 请帮忙! 以下是
httpd-vhost.conf
文件:
# Virtual Hosts
<VirtualHost *:8080>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:8080>
ServerName mydomain.com
DocumentRoot c:/wamp64/www/App
<Directory "c:/wamp64/www/App/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
DirectoryIndex index.html index.php
</VirtualHost>
#
另外,它在Windows Server 2012上运行WAMP / Magento,并托管在Azure中。 非常感谢!
请找到有关虚拟主机设置的注释。
#
# 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.
#
我发现虚拟主机配置正确,重定向问题出在MySQL Magento Db中,它指向localhost:8080
。 我将web/unsecure/base_url
和web/secure/base_url
下的core_config_data
更改为我的公共域,并且工作正常。 我张贴了这个答案,以防其他人遇到类似问题。 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.