smbx-ztbz

参考:

http://www.szchehang.com/news/10602.html

我们登录的路由器主界面就是通过这个软件指定了80端口来访问的。我们要添加自己额外的网站服务,那只需要重新定义一个端口即可。我定义了一个88端口作为网站端口。找到uhttpd的配置文件添加以下文字即可

config \'uhttpd\' \'webfile\'
list \'listen_http\' \'0.0.0.0:88\'
option \'home\' \'/mnt/sda1/webfile\'
option \'cgi_prefix\' \'/cgi-bin\'

上面的配置我将网站的主目录指定到了我一盘的第一分区中的webfile文件夹中

这时你需要重启uhttpd程序,那么你的网站服务器就算搭好了。你把你的网站放入webfile文件夹中。直接通过您的域名:88就可以访问了。这个有什么用处呢就看个人发挥啦。网站类型太多了,目前正在搞苹果程序开发,也没时间去捣鼓网站的事情。网站既然搭好了也不能不用吧。直接丢了几首歌曲在里面。

如果直接丢一个网页进去,效果图如下:

clip_image002

具体步骤:

1、配置文件修改

在配置文件中增加:

config uhttpd \'webfile\'
list listen_http \'0.0.0.0:88\'
option home \'/root/sda1/webfile\'
option cgi_prefix \'/cgi-bin\'

2、添加设计好的网页

包括htm文件和同名文件夹,可直接网上下载一个英文网页测试用。

3、添加index.html文件

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="0; URL=/cgi-bin/luci" />
</head>
<body style="background-color: black">
<a style="color: white; text-decoration: none" href="/cgi-bin/luci">LuCI - Lua Configuration Interface</a>
</body>
</html>

其中,"/cgi-bin/luci"处填写自己要跳转到的网页。例如可以添加

/CCTV%20News%20-%20China,%20World,%20Biz,%20Video,%20Live%20events%20-%20English_CCTV_com.htm

文件包括

clip_image003

4、保存,重启uhttpd

/etc/init.d/uhttpd restart

分类:

技术点:

相关文章:

  • 2021-07-19
  • 2021-12-09
  • 2021-11-15
  • 2021-11-05
  • 2021-09-11
  • 2021-11-05
  • 2021-09-08
  • 2021-12-06
猜你喜欢
  • 2021-11-24
  • 2021-11-29
  • 2021-09-07
  • 2021-12-11
  • 2021-11-29
  • 2021-11-05
相关资源
相似解决方案