Как включить Виртуальный хост на Xampp для Laravel?
У меня XAMPP работает на Windows 7 Pro. Я пытаюсь настроить виртуальный хост, чтобы при использовании «dev.app» в качестве домена я сразу попадал в общую папку установки 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 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 *:80
#
# 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 localhost>
DocumentRoot "F:/xampp/htdocs/"
ServerAdmin admin@localhost
<Directory "F:/xampp/htdocs/">
Options Indexes FollowSymLinks
AllowOverride all
</Directory>
</VirtualHost>
# Development
<VirtualHost dev.app>
DocumentRoot "F:/xampp/htdocs/dev/public"
ServerAdmin admin@localhost
<Directory "F:/xampp/htdocs/dev/public">
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
Затем я открыл файл hosts, расположенный по адресуC:\Windows\System32\drivers\etc
и добавил изменил строку localhost, чтобы выглядеть так
127.0.0.1 localhost dev.app
127.0.0.1 127.0.0.1
Однако, когда я захожу на dev.app в моем браузере, я получаю эту ошибку
Невозможно подключиться
Firefox не может установить соединение с сервером в app.dev.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
Что мне здесь не хватает? Что я сделал не так?
Замечания: Я перезапустил Apache после того, как изменил файл vhosts. Кроме того, я обновил файл app.php в папке конфигурации laravel, чтобыhttp://dev.app
значение в URL.
ОБНОВЛЕНО после добавления http: // .... сайт разрешается, но изображения не отображаются.