我正在Mac OS X上使用XAMPP.我正在尝试为客户端运行一个symfony网站,我真的不知道(还)symfony,我只是想安装并启动它.
我用这种方式改变了我的etc/hosts:
127.0.0.1 www.mysite.local
Run Code Online (Sandbox Code Playgroud)
和httpd.conf这样:
<VirtualHost *:80>
ServerName www.mysite.local
DocumentRoot /Applications/MAMP/htdocs/mysite/web
DirectoryIndex index.php
<Directory /Applications/MAMP/htdocs/mysite/web>
AllowOverride All
Allow from All
</Directory>
Alias /sf /Applications/MAMP/htdocs/mysite/lib/vendor/symfony/data/web/sf
<Directory "/Applications/MAMP/htdocs/mysite/lib/vendor/symfony/data/web/sf">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
现在,该网站正在运行(耶!),但我无法访问我的其他本地网站,因为localhost 呈现为www.mysite.local.哪里我错了?
谢谢!
我在Windows 7 Pro上运行XAMPP.我正在尝试设置虚拟主机,以便当我使用"dev.app"作为域时,我直接进入laravel安装的公共文件夹.
Laravel位于 F:/xampp/htdocs/dev/public
我打开了httpd-vhosts.conf位于的文件F:\xamp\apache\conf\extra\https-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 …Run Code Online (Sandbox Code Playgroud)