自动备份网站文件和数据库上传到FTP空间的脚本
主要功能有:自动备份网站文件和数据库并上传到FTP空间,在本地保留3天备份,远端FTP空间保留5天备份.
数据库备份采用发送到Email和FTP空间,双重备份,保证数据的安全.
首先安装Email发送组件
yum install sendmail mutt
主要功能有:自动备份网站文件和数据库并上传到FTP空间,在本地保留3天备份,远端FTP空间保留5天备份.
数据库备份采用发送到Email和FTP空间,双重备份,保证数据的安全.
首先安装Email发送组件
yum install sendmail mutt
location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
编辑apache/conf/extra/httpd-autoindex.conf
文件,找到:
IndexOptions FancyIndexing HTMLTable VersionSort
修改为:
ndexOptions FancyIndexing HTMLTable VersionSort NameWidth=*
pre, code {
display: block;
overflow: auto;
background: #f4f4f4;
padding: 5px 10px;
border: 1px solid #eee;
whitewhite-space:pre-wrap; /* css-3 */
whitewhite-space:-moz-pre-wrap; /* Mozilla, since 1999 */
whitewhite-space:-pre-wrap; /* Opera 4-6 */
whitewhite-space:-o-pre-wrap; /* Opera 7 */
word-wrap:break-word; /* Internet Explorer 5.5+ */
white-space: pre-wrap; /* Firefox */
}