虚拟机中移植lighttpd-1.4.22

来源:互联网 发布:软件企业退税 编辑:程序博客网 时间:2024/06/14 03:21

给一个网址分配一个空间或者一个主页面的方法
1:首先打开/etc/lighttpd/lighttpd.conf
2:server.document-root       = "/var/www/"  就是给你的网址分配空间,例如所有的文件

我都放在“/var/www/”的下面
3:index-file.names           = ( "index.php", "index.html",
                               "index1.htm", "default.htm",
                               "index.lighttpd.html" )
随便修改任意一个参数或者添加一个参数(参数既是你好运行的页面),可以是.html,

.cgi等形式的

4:输入root@James-Ubuntu10:~# /etc/init.d/lighttpd restart
5:OK啦
这个文本的意思就是,如果你的本机IP为192.168.1.113
你想运行http://192.168.1.113/index1.htm时
直接输入http://192.168.1.113就Ok了,默认的页面就是

http://192.168.1.113/index1.htm

原创粉丝点击