laravel - laravel 虚拟主机在 ubuntu 20 中不起作用
问题描述
我无法为我现有的 laravel 项目创建一个虚拟主机,站点名称将是生态系统,这对我来说非常重要,请任何专家帮助。尝试解决我的错误在哪里。我的 ocosystem.conf 文件:
<VirtualHost *:8080>
# The ServerName directive sets the request scheme, hostname and port that
# 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 webmaster@localhost
ServerName ocosystem
DocumentRoot /home/tamimjd/ocosystem/trunk/ocosystem/public
# 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}/error.log
CustomLog ${APACHE_LOG_DIR}/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 note
我的主机文件
27.0.0.1 localhost
127.0.1.1 tamimjd-VirtualBox
127.0.0.1 ocosystem
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
解决方案
推荐阅读
- php - How to get any first heading tags in post and display the result?
- python - 将Python中的负索引转换为正索引
- radio-button - 如何以角度形式制作工作单选按钮?
- android - 自定义listview点击获取值
- command-line - 如何使用带有 YASM 的 Visual C++ 端口构建 libmpg123?
- java - 从现有的 ArrayList 创建大小为 N 的子列表
- sql - 选择满足两个条件的ID
- javascript - Google Maps React - 使我的标记可点击
- javascript - Webpack babel-loader 不会转译导入的 .js 文件
- asp.net-core - .NET 核心 Web api 向客户端发送错误请求