Lighttpd设置虚拟目录

反射涟漪
• 阅读 3353

1、编辑lighttpd.conf

vim /etc/lighttpd/lighttpd.conf

在最后添加:

include_shell "cat vhosts.d/*.conf"

设置存放虚拟目录配置文件的目录。

2、设置虚拟目录

vim /etc/lighttpd/vhosts.d/www.example.com.conf

添加:

$HTTP["host"] == "www.example.com" {
server.name = "www.example.com"
server.document-root = "/home/www.example.com"
server.errorlog = "/var/log/lighttpd/www.example.com-error.log"
accesslog.filename = "/var/log/lighttpd/www.example.com-access.log"
}

3、建立相关目录

cd /home
mkdir www.example.com
chown -R lighttpd:lighttpd www.example.com/

4、重启Lighttpd

service lighttpd restart

如果没有注册成服务,也可以通过绝对路径重启

/etc/init.d/lighttpd restart
点赞
收藏
评论区
推荐文章
Oracle 分组与拼接字符串同时使用
SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(
Wesley13 Wesley13
4年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Easter79 Easter79
4年前
svg自适应写法
svg自适应写法<pre<!DOCTYPEhtml<htmllang"en"<head<metacharset"UTF8"<titleDocument</title</head<body<divstyle"width:30%;height:3.6rem;"<svg
Stella981 Stella981
4年前
Flutter接入现有iOS工程(混编)、开发调试、打包发布精简教程
本教程是在xcode11.1、cocospod1.7.5、flutter1.10.15pre.115下完成的。    1.安装flutter    按照官网的教程,一步一步来,没什么好说的。https://flutterchina.club/setupmacos/(https://ww
Stella981 Stella981
4年前
InsightFace源码以及pre
一下摘自:https://blog.csdn.net/Fire\_Light\_/article/details/79602705(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fblog.csdn.net%2FFire_Light_%2Farticle%2Fdetails%2F7960
Stella981 Stella981
4年前
Python获取 当前目录、上一级目录
<pre<spanstyle"color:0000ff"import</span<spanstyle"color:000000"os</span<spanstyle"color:0000ff"print</span<spanstyle"color:800000"'</span<spanstyle"c
Easter79 Easter79
4年前
TiDB Pre
8月30日,TiDB发布PreGA版。该版本对MySQL兼容性、SQL优化器、系统稳定性、性能做了大量的工作。TiDB:SQL查询优化器调整代价模型优化索引选择,支持不同类型字段比较的索引选择支持基于贪心算法的JoinReorder
Wesley13 Wesley13
4年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Stella981 Stella981
4年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Stella981 Stella981
4年前
Pre
PAT甲级1119,我先在CSDN上面发布的这篇文章:https://blog.csdn.net/weixin\_44385565/article/details/89737224(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fblog.csdn.net%2Fweixin_443855
Wesley13 Wesley13
4年前
Unity 获取场景中所有目标对象(包括不激活的对象)
usingUnityEngine;usingUnityEditor;usingSystem.Collections.Generic;publicclassExampleScript:MonoBehaviour{//获取场景中所有目标对象(包括不激活的对象)不包括Pre
反射涟漪
反射涟漪
Lv1
他年我若为青帝,报与桃花一处开。
文章
6
粉丝
0
获赞
0