svn+axure+nginx+htpasswd+php 做简单安全的技术产品文档管理网站

svn+axure+nginx+htpasswd+php 做简单安全的技术产品文档管理网站

1:htpasswd 是开源 http 服务器密码认证生成工具–安装
Centos

yum -y install httpd
#首先创建文件生成密码:
htpasswd -c /usr/local/nginx/passwd root (创建文件并生成一个账户)
htpasswd -b /usr/local/nginx/passwd root root1 (增加账户)

2:nginx.conf配置:

auth_basic  "enter you password:";
auth_basic_user_file /usr/local/nginx/passwd;

3:index.php

function readDirs($path) {
    $dir_handle = openDir($path); 
    while(false !== $file=readDir($dir_handle)) {
        if ($file=='.' || $file=='..') continue;
        //输出该文件
        if(!is_file($file) && $file !== ".svn"){
           echo '<a href="http://你的域名/'.$file.'/start.html">'.$file.'</a><br>';
         }
    }
    closeDir($dir_handle);
}
 
$path = '/home/wwwroot/axure';
readDirs($path);

4:安装svn–这部自行安装–网上资料很多!
安装好后,把生成的axure技术文档整个文件夹上传就行了
图1:
在这里插入图片描述点击技术架构如图:
在这里插入图片描述

发布了6 篇原创文章 · 获赞 1 · 访问量 223

猜你喜欢

转载自blog.csdn.net/wnw001/article/details/104429455