Beauty Directory是源于zdir,使用PHP开发的目录列表程序。跨平台,响应式UI,无需数据库,体积小巧,功能强大,无广告,简洁美观。
扫描下方二维码,打赏一杯咖啡(30元),便可获取Beauty Directory源代码。
打赏后请联系QQ:215836979获取。
获取Beauty Directory代码,将源代码里的BeautyDir
下面的文件复制到站点根目录
将config.simple.php
修改为config.php
将config.php
里的各项设置自己的网站URL,标题/关键词/描述,设置好需要排除的文件目录。
将config.php
里的thedir
的设置为空。
配置的时候目录结构如下。
注意 服务器需要设置伪静态才能正常运行,参考如下伪静态设置方法。
BeautyDir
目录到站点根目录,首页显示的文件放在根目录下。BeautyDir
下的config.simple.php
修改为config.php
config.php
里的各项设置自己的网站URL,标题/关键词/描述,需要排除的文件目录config.php
里的thedir
需要设置成网站根目录路径。BeautyDir
目录里的.htaccess.bak
复制到根目录下重命名为.htaccess
。.htaccess
文件,内容为如下: RewriteEngine On
DirectoryIndex BeautyDir/index.php
RewriteRule 'static/(.*)$' BeautyDir/static/$1 [L]
Options -Indexes
order deny,allow
server {
listen 80;
server_name localhost;
#access_log /var/log/BeautyDir.log combined;
index BeautyDir/index.php index.html index.htm index.php;
root /data/wwwroot/default;
#rewrite
rewrite ^/static/(.+) /BeautyDir/static/$1 break;
#error_page 404 /404.html;
#error_page 502 /502.html;
location ~ [^/]\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /\.ht {
deny all;
}
}
.mp3
.wav
.flac
.ape
)如果你有任何建议欢迎留言。
BeautyDirectory的诞生离不开以下开源项目,在此表示感谢。