apache - 如何在 Debian 下的用户目录中为网站启用 Apache 虚拟主机?
问题描述
我想在本地运行一个网站,其文件在我的用户目录中,我在下面创建了 .conf 文件,a2ensite'd,apache 重新加载,当我在浏览器中键入 /localhost/instanote.com 时,找不到.
ServerName instanote.com
ServerAlias insta-note.com
DocumentRoot /home/thomas/ownCloud/CW14/cms_cw14
<Directory "/home/thomas/ownCloud/CW14/cms_cw14">
Options FollowSymlinks
AllowOverride all
Require all granted
</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}/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 *:80”>“”“<”“/VirtualHost”“>”没有显示在上面,但它们存在于我的代码谢谢
解决方案
推荐阅读
- vim - 如何在插入模式下将光标设置为细,而在正常模式下仍被阻止
- android - 在jetpack compose中请求关注TextField
- javascript - 即使用户有一些播放列表,Spotify Web API 也会为用户播放列表返回空项目
- c++ - 涉及输出计时持续时间的 C++ 错误
- javascript - Javascript检查,如果数组元素等于var?
- tensorflow - 将多个不同序列长度的输入数据传递给 Keras
- r - 需要使用另一个文件上的列信息对主数据框进行子集化
- flutter - 浮动动作按钮中的颤动位置文本?
- kubernetes - 如何获取除主节点外的所有状态为“就绪”的节点?
- java - 尝试在我的手机上对应用程序进行负载测试错误一直说“无法删除目录: