【发布时间】:2021-02-18 02:09:26
【问题描述】:
我已经为一个 laravel 项目实现了一个虚拟主机,并且没有任何问题,并且在实现所有东西时真的没有问题。
现在我为我的 lumen 项目做同样的事情,但它不起作用:
Hmm. We’re having trouble finding that site.
这就是我的 test.local.conf 的样子:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port t>
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin admin@test.com
ServerAlias test.local
ServerName test.local
DocumentRoot /var/www/html/test/public
<Directory /var/www/html/test/public>
Options -Indexes +FollowSymLinks
AllowOverride All
Allow from all
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/test.local-error.log
CustomLog ${APACHE_LOG_DIR}/test.local-access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
我已经重新启动了 apache,但它不起作用。我在这里做错了什么?
【问题讨论】:
标签: ubuntu virtualhost virtual lumen host