![](/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.