转自:http://blog.sina.com.cn/s/blog_d2facf270101g7hy.html
|
路由器上用的是wifidog client,服务器后端管理用的是authpuppy。
首先,选择自己的操作系统,在http://www.authpuppy.org/doc/Main_Page网站里面,我的操作系统是Linux。
然后到这个网站http://www.authpuppy.org/doc/Getting_Started去下载check_configuration.php这个文件是检测你的电脑安装authpuppy需要哪些环境,下面是我配置好的环境
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="图片_x0020_4" o:spid="_x0000_i1028" type="#_x0000_t75" alt="wifidog+authpuppy认证页面的配置" href="http://photo.blog.sina.com.cn/showpic.html#blogid=d2facf270101g7hy&url=http://album.sina.com.cn/pic/d2facf27gx6Di229KDacc" target="_blank" style='width:510pt;height:440.25pt;visibility:visible; mso-wrap-style:square' o:button="t"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.png" o:title="wifidog+authpuppy认证页面的配置"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
然后到这个http://launchpad.net/authpuppy 下载authpuppy的源码,然后把解压后的authpuppy目录放到apache2的站点目录,我的是ubuntu12.10,安装后的apache2目录是/etc/apache2/sites-available/default,
打开的内容是
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/authpuppy/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
由于刚开始什么都不懂,都不知道里面目录是什么意思,所以就挑几个来说明下
DocumentRoot /var/www 这个目录是apache2服务器的根目录,也就是说当你打开浏览器在地址栏输入127.0.0.1时,就是进入/var/www/这个目录里面
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
这个是你在apache里面架设服务器的根目录,比如我架设的是authpuppy,当我一进入authpuppy是/var/www/authpuppy/web/这个目录下的文件,其他的也没什么好讲的。所以我们应该把authpuppy目录放在/var/www/这个目录下面。
接下来就是配置这个apache这个,这个是让我最头疼的地方,配置了好几天,才搞明白是怎么回事。
首先咱们来看下http://www.authpuppy.org/doc/Getting_Started这个里面的配置内容
<!--[if gte vml 1]><v:shape id="图片_x0020_5" o:spid="_x0000_i1027" type="#_x0000_t75" alt="wifidog+authpuppy认证页面的配置" href="http://photo.blog.sina.com.cn/showpic.html#blogid=d2facf270101g7hy&url=http://album.sina.com.cn/pic/d2facf27gx6Di3RgzV8d2" target="_blank" style='width:441pt;height:368.25pt;visibility:visible; mso-wrap-style:square' o:button="t"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image003.png" o:title="wifidog+authpuppy认证页面的配置"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
我一开始也没多想就直接复制和粘帖,结果安装到第三步就出错了。哦,忘了说怎么安装了,在浏览器的地址栏上输入127.0.0.1查看authpuppy的目录在哪,然后进入authpuppy里面web的目录,就会在网页上跳出安装页面。
再回过来说说apache怎么配置吧,先给大家看看我的配置文件
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName authpuppy.localhost
ServerAlias authpuppy.test
DocumentRoot /var/www/
DirectoryIndex index.php
<Directory /var/www/authpuppy/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Alias /sf /var/www/authpuppy/lib/vendor/symfony/data/web/sf
<Directory "/var/www/authpuppy/lib/vendor/symfony/data/web/sf">
AllowOverride All
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
不知道大家有没发现这两个目录不一样
ErrorLog /var/log/apache2/authpuppy/error.log
CustomLog /var/log/apache2/authpuppy/access.log
我在我的电脑里面发现/var/log/apache2/里面没有authpuppy这个目录,后来我就把这两个目录改了,最后安装成功。当你见到如下图片的时候就说明你已经安装成功,接下来尽管next就行了。
<!--[if gte vml 1]><v:shape id="图片_x0020_6" o:spid="_x0000_i1026" type="#_x0000_t75" alt="wifidog+authpuppy认证页面的配置" href="http://photo.blog.sina.com.cn/showpic.html#blogid=d2facf270101g7hy&url=http://album.sina.com.cn/pic/d2facf27gx6Di5e5b2sdc" target="_blank" style='width:515.25pt;height:387pt;visibility:visible; mso-wrap-style:square' o:button="t"> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image005.png" o:title="wifidog+authpuppy认证页面的配置"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
现在authpuppy已经安装完了,先松一口气吧。
接下来我们就来配置wifidog.conf文件以实现和authpuppy相链接。
这是wifidog.conf文件
http://dev.wifidog.org/browser/trunk/wifidog/wifidog.conf
由于第一次接触路由,所以有几个地方先说明下,自己老是搞乱,给以后的新手留给经验。
最最重要的一点是,在这个配置文件里面第一格不能是空格,否则就会出错。
ExternalInterface br-lan 这个是lan口,这样才能连上路由,比如手机
GatewayInterface eth0.2 这个是wan口,通过这个与authpuppy server通信。所以主机的网卡要和wan同一网络,
我的wan口ip是192.168.2.200,要和Hostname同一网段,才能通信。
AuthServer {
Hostname 192.168.2.2
SSLAvailable yes
Path /authpuppy/web/
}
还有这个Path,一开始我是设置成 / 根目录,结果不行,出现了这个问题:
HTTP Response from Server: [HTTP/1.1 404 Not Found
后来设置成这个目录才可以。还有一点要注意的是Path的目录两边都要加/,不然也会出错。
https://launchpad.net/authpuppy/+download<!--[if !supportNestedAnchors]--><!--[endif]-->
Authpuppy文档:
相关推荐
wifidog+authpuppy认证页面
wifidog+authpuppy部署文档及源码
wifidog+authpuppy源码,有几个插件
讲解wifidog+authpuppy实现OpenWRT下Portal认证
3、因此,只能使用openwrt和PandoraBox固件,查询了多种方法,都是需要对固件进行编译的,由于小弟不懂编程,只有通过网友们的安装配置经验进行参考,在刷好的固件基础上安装wifidog和Luci界面的配置,如果哪位高手...
authpuppy wifi服务端认证配置详解,authpuppy是一个集成的php项目包的第三方认证控件。
wifidog 门户认证 源代码wifidog 门户认证 源代码wifidog 门户认证 源代码wifidog 门户认证 源代码
本文描述MTK Openwrt wifidog下portal认证的系统整体移植流程文档。包括MTK openwrt的的配置,wifidog的安装及配置,认证服务器的搭建流程及验证测试流程。
用php编写的wifidog认证服务器脚本,主要实现了用户的登录校验和认证授权。
此项目修复了Wifidog不稳定的问题,并增加了AC远程管理,JavaScript注入,Web缓存,URL劫持等创新功能。 项目的开源地址: http://www.wifidog.pro/sourcecode.html
收集整理的wifidog认证过程及web服务器变量说明
7.wifidog配置页面 新增预览功能,用于判断认证参数是否配置正确 V8.0版本次发布为mini版(4M)和完整版(8M),mini版比完整版少了迅雷下载、FTP等USB相关应用的支持 1.云认证接口升级为wifidog标准协议,解决了...
资源名称:apfree_wifidog源码 使用场景:当设备借入后需要进行wifidog认证; 功能说明: (1)包含两版apfree_wifidog-2.10.1437.zip与apfree_wifidog-master.zip,可根据需要自行选择下载
wifidog.conf配置文件,没有OPENWRT的WIFIDOG的图形,可以下载这个文件,上传到/ETC/文件下面就可以认证了
wifidog的运行环境及authpuppy的数据交互过程,数据包交互的内容。
最新wifidog认证服务器源码.zip
wifi认证流程说明 + 完整portal 协议+ Radius协议测试程序 + AC配置手册
wifidog用php实现认证 客户端首次连接到wifi后,浏览器请求将会被重定向到: login/?gw_address=%s&gw_port=%d&gw_id=%s&url=%s 验证通过后,客户端被重定向到网关,url格式如下:
集客云搭建wifidog的文档后台编程案例代码,集客云平台是一个智能路由器营销平台,可以自行定制云端后台效果
wifidog_authserver_demo-wifidog_v1