`
fp_moon
  • 浏览: 985956 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

wifidog+authpuppy认证页面的配置

阅读更多

转自:http://blog.sina.com.cn/s/blog_d2facf270101g7hy.html

wifidog+authpuppy认证页面的配置

 

路由器上用的是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&amp;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]-->wifidog+authpuppy认证页面的配置<!--[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&amp;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]-->wifidog+authpuppy认证页面的配置<!--[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&amp;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]-->wifidog+authpuppy认证页面的配置<!--[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同一网络,
我的wanip192.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的目录两边都要加/,不然也会出错。

 

 

Authpuppy下载:

https://launchpad.net/authpuppy/+download<!--[if !supportNestedAnchors]--><!--[endif]-->

 

Authpuppy官网:

http://www.authpuppy.org/

 

Authpuppy文档:

 

http://www.authpuppy.org/doc/Main_Page

分享到:
评论

相关推荐

    wifidog+authpuppy认证页面

    ### wifidog+authpuppy 认证页面配置与实现 #### 一、wifidog+authpuppy 概述 **wifidog** 是一款开源的热点认证系统,广泛应用于公共Wi-Fi场景中,如咖啡馆、图书馆等,通过提供简单易用的界面来帮助用户进行网络...

    wifidog+authpuppy部署文档及源码

    5. **定制认证界面**:Authpuppy 允许你自定义认证页面的样式和内容,以便与你的品牌形象保持一致。这可能涉及到修改 HTML 和 CSS 文件。 6. **测试和调试**:部署完成后,进行测试以确保所有组件都能正常工作。...

    MTK+openwrt+wifidog移植

    总之,MTK Openwrt wifidog移植涉及到OpenWrt源码的定制、wifidog的编译和安装,以及authpuppy认证服务器的部署和配置。这个过程需要对Linux系统、网络配置和编程有一定的了解,但遵循正确的步骤和指南,可以为网络...

    wifidog总结

    - 用户发起连接请求,wifidog捕获该请求并重定向用户到认证页面(portal)。 - wifidog与Authpuppy之间进行ping数据包交互,以确认网络通信正常。 - 用户输入认证信息后,该信息由wifidog转发至Authpuppy进行验证。 ...

    OpenWRT实现Portal认证

    这些配置项分别指定了用户登录成功后重定向到的页面、Portal页面、错误信息显示页面、网络连通性测试页面和认证页面。它们的默认值分别为login/、portal/、gw_message.php、ping/和auth/。 此外,GatewayPort配置项...

    wifidog-auth:一个使用php编写的简单的wifidog认证系统

    它通常与路由器上的Wi-FiDog Gateway配合工作,后者负责拦截所有未经认证的网络流量,并将其重定向到认证页面。一旦用户成功通过认证,他们的网络访问权限将被放开。 在`wifidog-auth`项目中,我们可以看到以下主要...

    OpenWRT 下实现 Portal 认证(WEB 认证)

    3. Wifidog响应一个HTTP重定向,指向Web认证页面,并在URL的Querystring中包含必要的信息,如网关ID、网关的FQDN等。 4. 用户在认证页面提交认证请求,包括网关ID、网关地址、网关端口、请求的URL和用户凭据。 5. ...

Global site tag (gtag.js) - Google Analytics