Skip to content


linux服务器下简单的异地数据备份

为保证数据不丢失我们可以在自己电脑上做一个自动备份,把远程服务器的数据定时保存在本地,以备恢复时用。

首先需要 设置无需密码的ssh登陆,方法如下:
假设A,B两服务器,现在需要在A机上用root登陆B机,而不需要输入密码,那我们可按照下面的步骤来做:
1)在A机上生成钥匙对,执行以下命令:
ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa
Enter passphrase (empty for no passphrase):直接回车
Enter same passphrase again:直接回车
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
f6:61:a8:27:35:cf:4c:6d:13:22:70:cf:4c:c8:a0:23 root@host1

这样,在/root/.ssh/路径下会生成id_rsa,和id_rsa.pub,其中id_rsa是密钥,id_rsa.pub是公钥。

2)把在A机生成的id_rsa.pub拷贝到B机上,假设拷贝到B机的临时目录下,如:
scp /root/.ssh/id_rsa.pub root@x.x.x.x:/tmp
3)用root帐号登陆B机,进入其主目录,创建authorized_keys文件,并设置好权限。
cd ~/.ssh
cat /tmp/id_rsa.pub >>authorized_keys
chmod  400 authorized_keys
rm -f /tmp/id_rsa.pub

4)测试
在A机上转到root帐号,尝试登录B机。看看是不是不要密码.
说明:
authorized_keys文件的权限很重要,如果设置为777,那么登录的时候,还是需要提供密码的。
记得将临时目录下的id_rsa.pub删除,养成个好习惯。

编写个备份文件以日期来保存的脚本。

#!/bin/bash
d=`date +%Y%m%d`
tar czf /web/web-bak/$d.tar.gz -P /web/

然后再本地写个脚本通过scp拷贝到本地

scp root@x.x.x.x:/web/$d.tar.gz /root/web-bak

如果硬盘空间有限的话可以再加一个删除一段时间前文件的脚本。

find /root/web-bak  -mtime +15 -name “*.tar.gz” -exec rm -rf {} \;

加入计划任务就可以自动运行你的脚本了

crontab -e

18 * * * *  /root/web-bak/bak.sh

这样一个简单的异地备份就完成了。

Posted in linux.

Tagged with , .


linux内存占用率过高,释放内存

网上看到linux释放内存的做法,不知道对提升服务器性能有多大帮助,做了之后发现内存真的占用很少。

之前内存使用情况:

Mem:   4151608k total,  3973072k used,   178536k free,   158548k buffers
Swap:  5668856k total,       48k used,  5668808k free,  3105956k cached

操作之后的内存使用情况:

Mem:   4151608k total,   597300k used,  3554308k free,     3296k buffers
Swap:  5668856k total,       48k used,  5668808k free,    41400k cached

操作方式如下:

[root@localhost ~]# sync

[root@localhost ~]# echo 3 > /proc/sys/vm/drop_caches
[root@localhost ~]# cat /proc/sys/vm/drop_caches

把内存里的数据暂时写到硬盘里

Posted in linux.

Tagged with , .


centos安装配置xcache加速php

XCache 是一个开源的 opcode 缓存器/优化器, 这意味着他能够提高您服务器上的 PHP 性能. 他通过把编译 PHP 后的数据缓冲到共享内存从而避免重复的编译过程, 能够直接使用缓冲区已编译的代码从而提高速度. 通常能够提高您的页面生成速率 2 到5 倍, 降低服务器负载.

wget http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.gz

/usr/local/php5/bin/phpize

./configure –enable-xcache –enable-xcache-coverager –with-php-config=/usr/local/php/bin/php-config –enable-inline-optimization –disable-debug

make && make install

/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/xcache.so

vi /usr/local/php5/lib/php.ini

文件的最后添加如下面这些内容:

[xcache-common]
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so

[xcache.admin]
xcache.admin.user = “admin”
;;如何生成md5密码: echo -n “password”| md5sum
xcache.admin.pass = “f6c770a1c6a0cd6b5639baf16d4c6a3d”

[xcache]
xcache.cacher = On
xcache.shm_scheme = “mmap”
xcache.size = 32M
; cpu number (cat /proc/cpuinfo |grep -c processor)
xcache.count = 2
xcache.slots = 8k
xcache.ttl = 0
xcache.gc_interval = 0
xcache.var_size = 2M
; cpu number (cat /proc/cpuinfo |grep -c processor)
xcache.var_count = 2
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.readonly_protection = Off
xcache.mmap_path = “/dev/zero”

管理可以通过 http://localhost/xcache/admin

Posted in php.

Tagged with , , .


隐藏服务器信息

默认情况下,很多Apache安装时会显示版本号及操作系统版本,甚至会显示服务器上安装的是什么样的Apache模块。这些信息可以为黑客所用,并且黑客还可以从中得知你所配置的服务器上的很多设置都是默认状态。

这里有两条语句,需要添加到httpd.conf文件中:

ServerSignature Off

ServerTokens Prod

ServerSignature出现在Apache所产生的像404页面、目录列表等页面的底部。ServerTokens目录被用来判断Apache会在Server HTTP响应包的头部填充什么信息。如果把ServerTokens设为Prod,那么HTTP响应包头就会被设置成:

Server:Apache

二、隐藏PHP信息

修改php.ini

将expose_php On
改为
expose_php Off

Posted in web server.

Tagged with , , .


JS 自定义函数时,如何指定参数默认值

如何在定义一个函数里给参数一个默认值,开始想当然地认为可能像php或python等语言中一样

js 代码
 
  • :function test(a,b=”er”){  
  •      alert(a + b );  
  • }  
  • 调用:  
  •   test(a)  
  •   
  •   test(a,b)  
  • 可是,定义完之后一直在报错:缺少对象.经过查询才发现,javascript中的确不能这样定义,可以借肋于arguments 是实参数组,参考下例:

    js 代码
     
  • <script>  
  • function Test(a){  
  • var b=arguments[1]?arguments[1]:50  
  • return a+’:'+b  
  • }  
  • alert(Test(5))  
  • alert(Test(5,9))  
  • </script>  
  • Posted in div & css.

    Tagged with , .


    Apache Redirects for SEOs

    If you use the redirect without the status argument, it will return a status code of 302 by default. This default behaviour has given me problems over the years as an SEO, so it’s important to remember to use it, like this:

    Redirect permanent /one http://www.newdomain.com/two

    or

    Redirect 301 /two http://www.newdomain.com/other

    Both of which will return the 301 status code. If you wanted to return a 302 you could either not specify anything, or use “302″ or “temp” as the status argument above.

    You can also use 2 other directives – RedirectPermanent URL-path URL (returns a 301 and works the same as Redirect permanent /URL PathURL) and RedirectTemp URL-path URL (same, but for a 302 status).

    For more global changes, you would use redirectMatch, with the same syntax:

    RedirectMatch 301 ^(.*)$ http://www.newdomain.com

    or

    RedirectMatch permanent ^(.*)$ http://www.newdomain.com

    Basic Old Website to New Website Redirection

    a.If you have mod_rewrite installed, add this code:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^newdomain\.com
    RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

    b. If you don’t have mod_rewrite installed, you really should. If you can’t install it, then you can use this code instead:

    RedirectMatch 301 ^(.*)$ http://www.newdomain.com

    Posted in web server.

    Tagged with , , , .


    centos memcache

    1.get source

    wget http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz
    wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz

    2.compile libevent

    tar -zxvf libevent-1.4.13-stable.tar.gz
    cd libevent-1.4.13-stable
    ./configure
    make
    make install

    3.compile memcached

    tar -zxvf memcached-1.4.4.tar.gz
    cd memcached-1.4.4
    ./configure –prefix=/opt/memcached –with-libevent
    make
    make install

    4.start memcached

    cd /opt/memcached/bin
    ./memcached -d -m 256 -p 11211 -u root // -d daemon, -m ram, -p port default is 11211, -u user
    if your os is 64bit maybe get a error “cant find libevent” try this
    在 64bit 系统启动,会报找不到 libenent,可以如下操作
    cp -R /usr/local/lib/libevent* /usr/lib64/

    5.php memcache ext

    wget http://pecl.php.net/get/memcache-2.2.4.tgz
    cd memcache-2.2.4
    whereis php-config
    whereis phpize
    phpize && ./configure –enable-memcache –with-php-config=/usr/local/bin/php-config
    make
    make test
    make install

    vi /usr/local/lib/php.ini

    extension_dir = “/usr/local/lib/php/extensions/no-debug-zts-20060613/”
    extension = “memcache.so”

    6.monitor memcached

    wget http://livebookmark.net/memcachephp/memcachephp.zip
    put memcache.php file to wwwroot

    vi memcache.php

    define(‘ADMIN_USERNAME’,'user’); // Admin Username
    define(‘ADMIN_PASSWORD’,'pass’); // Admin Password
    $MEMCACHE_SERVERS[] = ‘yourMemCachedHost:11211′; // add more as an array

    http://host.com/memcache.php

    Posted in linux.

    Tagged with , .


    centos vsftp

    首先查看有没有安装vsftpd软件包

    运行命令

    rpm -qa | grep vsftpd

    然后通过 yum安装vsftpd,一般云志互联提供的美国独立主机已经默认安装了vsftpd,可以省略此步骤。

    运行命令

    yum install vsftpd

    centos 会自动下载安装。

    安装完毕后,设置开机自动运行。

    service vsftpd start

    chkconfig vsftpd on

    此时可以通过 netstat -tl查看是否在监听21端口。

    接着就可以添加ftp虚拟帐号:

    特别提醒:用 useradd建立的用户,如果后面不加–s /sbin/nologin参数,建立的用户为普通系统用户,有系统登陆centos服务器的权限,在虚拟主机环境下,这非常危险。所以要在useradd命令后面加上参数–s /sbin/nologin,为centos 服务器虚拟主机添加不可以登录系统的ftp专用账号,命令如下:
    # useradd -s /sbin/nologin -d /var/www   -g ftp gpu

    说明:

    -s /sbin/nologin是让其不能登陆系统
    -d 是指定用户目录为/var/www ,这里可以替换成任何你需要的目录。
    -g ftp 把用户加入到ftp组中
    gpu是ftp用户名,在配置时把这个gpu换成你的ftp用户名。

    执行该命令后,如果出现这样的错误提示:

    useradd: warning: the home directory already exists.
    Not copying any file from skel directory into it.

    这说明用户的目录已经存在(/var/www,这个可以是任何你设定的目录),不可再新建此目录,并非添加用户失败,可以忽略。

    下面就为这个新添加的用户创建 ftp密码

    # passwd gpu

    接下来修改/var/www目录属性:(或任何自己定义的目录)
    $ chmod -R 777 /var/www 递归地给此目录下所有文件和子目录的读、写、执行权限
    $ chgrp -R ftp   /var /www 递归地把此目录及该目录下所有文件和子目录的组属性设置成ftp组

    然后配置 vsftpd 的配置文件

    vi /etc/vsftpd/vsftpd.conf

    基本可以保持默认的参数不变,只有2个地方需要修改为如下:

    anonymous_enable=NO  禁止匿名登录

    chroot_local_user=YES  限制在自己的目录

    最后重启 vsftpd服务

    #service vsftpd restart

    附:

    用户管理
    userdel 选项 用户名   #删除用户
    常用的选项是-r,它的作用是把用户的主目录一起删除。
    passwd 选项 用户名 #修改口令
    passwd -l 用户名 锁定口令,即禁用账号。
    passwd -u 用户名 口令解锁。
    passwd -d 用户名 使账号无口令。
    passwd -f 用户名 强迫用户下次登录时修改口令。
    如果默认用户名,则修改当前用户的口令。
    如果是超级用户,可以用下列形式指定任何用户的口令:
    passwd 用户名
    passwd -d 用户名 此命令将用户的口令删除,这样用户下一次登录时,系统就不再询问口令

    是否想修改21端口呢?
    先修改防火墙,增加其FTP端口,下面使用921
    -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 921 -j ACCEPT
    /etc/init.d/iptables restart   #重启防火墙
    /etc/vsftpd/vsftpd.conf 里增加加   listen_port=921
    /etc/rc.d/init.d/vsftpd restart    #重启vsftpd
    netstat -an |grep 921             #查看端口是否正常启动:
    有时客户端反应很慢,可以使用被动模式

    Posted in linux.

    Tagged with , .


    centos apache+mysql+php install && settings

    一、mysql安装(mysql-standard-5.0.27-linux-i686-glibc23.tar.gz)
    安装文件放到了/usr/local/src目录
    1、tar zxvf mysql-standard-5.0.27-linux-i686-glibc23.tar.gz
    2、mv mysql-standard-5.0.27-linux-i686-glibc23.tar.gz /usr/local/mysql
    3、groupadd mysql 建mysql组
    4、useradd -g mysql mysql 新增mysql用户,并添加到mysql组
    5、cd /usr/local/mysql
    6、scripts/mysql/mysql_install_db –user=mysql 创建mysql授权表,如果是mysql用户登录可省–user=mysql
    7、chown -R root .     当前目录下的文件的所有属性改为root用户
    8、chown -R mysql data  将data数据目录的所有属性改为mysql用户
    9、chgrp -R mysql .     将组属性改为mysql组
    10、bin/mysqld_safe –user=mysql &
    11、bin/mysqladmin -u root password ’1qaz2wsx’  设置密码
    12、cp support-files/my-medium.cnf /etc/my.cnf
    数据库目录默认(/usr/local/var)
    13、vi /etc/rc.d/rc.local 添加 /usr/local/mysql/bin/mysqld_safe –user=mysql &

    附:mysql.server和mysqld_safe脚本和Mac OS X Startup Item可以用来手动启动服务器,或自动启动系统。mysql.server和Startup Item还可以用来停止服务器。
    mysql.server脚本可以被用来启动或停止服务器,通过用start或stop参数调用它:
    shell> mysql.server start
    shell> mysql.server stop
    mysql.server stop通过向服务器发出一个信号停止它。你可手动执行mysqladmin shutdown关闭服务器。
    要想在服务器上自动启动和停止MySQL,应在“/etc/rc * 文件中适当的地方增加启动、停止命令。
    要想手动安装mysql.server(/usr/local/mysql/support-files),用名称mysql将它复制到/etc /init.d目录,然后将它变为可执行文件。只需要将位置更改为mysql.serveris所在并执行这些命令的相应目录:
    shell> cp mysql.server /etc/init.d/mysql
    shell> chmod +x /etc/init.d/mysql
    shell> chkconfig –level 345MySQL on
    也可以在一个全局“/etc/my.cnf”文件中增加mysql.server的选项。一个典型的“/etc/my.cnf”文件可能看起来像这样:
    [mysql.server]
    basedir=/usr/local/mysql

    2. 安装OpenSSL
    tar zxvf openssl-0.9.8e.tar.gz
    cd openssl-0.9.8e
    ./config –prefix=/usr/local/openssl shared
    make
    make install
    修改(此步骤非常重要,至少对于现有的软件版本)
    vi /etc/ld.so.conf 添加一行/usr/local/openssl/lib/
    /sbin/ldconfig

    3、安装Curl库 (yum install curl curl-devel)
    # tar -zxf curl-7.15.0.tar.gz
    进入解压后的目录
    mkdir /usr/local/curl
    # ./configure –prefix=/usr/local/curl
    # make; make install

    4、安装expat(暂不清楚)
    cd /usr/local/src
    tar -zxvf expat-2.0.0.tar.gz
    mkdik /usr/local/expat
    cd expat-2.0.0
    ./configure –prefix=/usr/local/expat
    make;make install

    5、gzip安装
    cd /usr/local/src
    tar -zxvf gzip-1.3.5.tar.gz
    mkdir /usr/local/gzip
    cd /gzip-1.3.5
    ./configure –prefix=/usr/local/gzip
    make;make install

    6、安装libxml2 (yum install libxml2 libxml2-devel)
    1、解压,并进入解压后的目录
    2、mkdir /usr/local/libxml2
    3、./configure –prefix=/usr/local/libxml2
    4、make;make install

    7、安装zlib(默认安装,请勿自作主张修改)
    1、解压
    2、进入解压后的目录,./configure
    3、make;make install

    8、安装jpeg,(yum install libjpeg libjpeg-devel)
    # tar zxvf jpegsrc.v6b.tar.gz
    # cd jpeg-6b
    # mkdir /usr/local/jpeg
    # mkdir /usr/local/jpeg/bin
    # mkdir /usr/local/jpeg/lib
    # mkdir /usr/local/jpeg/include
    # mkdir /usr/local/jpeg/man
    # mkdir /usr/local/jpeg/man/man1
    # ./configure –prefix=/usr/local/jpeg –enable-shared –enable-static
    # make;make install

    9、libpng (yum install libpng libpng-devel)
    1、解压
    2、进入解压后的目录,./configure
    3、make;make install
    10、安装freetype (yum install freetype freetype-devel)
    1、解压,mkdir /usr/local/freetype
    2、进入解压后的目录 ./configure –prefix=/usr/local/freetype
    3、make;make install

    11、安装gd (yum install gd gd-devel)
    # tar zxvf gd-2.0.33.tar.gz
    # cd gd-2.0.33,mkdir /usr/local/gd
    # ./configure –prefix=/usr/local/gd –with-jpeg=/usr/local/jpeg –with-freetype=/usr/local/freetype –with-png –with-zlib
    //编译过程中会看到如下信息
    ** Configuration summary for gd 2.0.33:
    Support for PNG library:          yes
    Support for JPEG library:         yes
    Support for Freetype 2.x library: yes
    Support for Fontconfig library:   no
    Support for Xpm library:          no
    Support for pthreads:             yes
    //可以看到png 、 jpeg 、 freetype都已经安装上了
    # make
    # make install

    12、安装 libxslt (yum install libxslt libxslt-devel暂不清楚)
    # tar -zxf libxslt-1.1.15.tar.gz
    # cd libxslt-1.1.15
    mkdir /usr/local/libxslt
    # ./configure –prefix=/usr/local/libxslt –with-libxml-prefix=/usr/local/libxml2
    # make; make install

    13、安装libmcrypt(yum install libmcrypt libmcrypt-devel 不然登录phpmyadmin时提示缺少mcrypt*)
    1、解压,并进入解压后的目录
    2、mkdir /usr/local/libmcrypt
    3、./configure –prefix=/usr/local/libmcrypt
    4、make;make install

    二、Apache安装
    1、解压,mkdir /usr/local/apache2
    2、进入解压后的目录(菜鸟请严格按下面的参考)
    ./configure –prefix=/usr/local/apache2 –with-mysql=/usr/local/mysql  –enable-cgi –enable-ssl –with-ssl=/usr/local/openssl (–enable-so)这个参数适应的进行添加 –enable-rewrite –enable-modules=all –enable-mods-shared=all
    make
    make install
    设置成开机自启动
    在/etc/rc.d/rc.local文件中加入一行
    /usr/local/apache/bin/apachectl start
    这样每次重新启动系统以后,apache也会随系统一起启动.
    (注解:
    ./configure //配置源代码树
    –prefix=/usr/local/apache2 //Apache的安装目录。
    –enable-module=so //打开 so 模块,so 模块是用来提 DSO 支持的 apache 核心模块
    –enable-deflate=shared //支持网页压缩
    –enable-expires=shared //支持 HTTP 控制
    –enable-rewrite=shared //支持 URL 重写
    –enable-cache //支持缓存
    –enable-file-cache //支持文件缓存
    –enable-mem-cache //支持记忆缓存
    –enable-disk-cache //支持磁盘缓存
    –enable-static-support //支持静态连接(默认为动态连接)
    –enable-static-htpasswd //使用静态连接编译 htpasswd – 管理用于基本认证的用户文件
    –enable-static-htdigest //使用静态连接编译 htdigest – 管理用于摘要认证的用户文件
    –enable-static-rotatelogs //使用静态连接编译 rotatelogs – 滚动 Apache 日志的管道日志程序
    –enable-static-logresolve //使用静态连接编译 logresolve – 解析 Apache 日志中的IP地址为主机名
    –enable-static-htdbm //使用静态连接编译 htdbm – 操作 DBM 密码数据库
    –enable-static-ab //使用静态连接编译 ab – Apache HTTP 服务器性能测试工具
    –enable-static-checkgid //使用静态连接编译 checkgid
    –disable-cgid //禁止用一个外部 CGI 守护进程执行CGI脚本
    –disable-cgi //禁止编译 CGI 版本的 PHP
    –disable-userdir //禁止用户从自己的主目录中提供页面
    –with-mpm=worker // 让apache以worker方式运行
    –enable-authn-dbm=shared // 对动态数据库进行操作。Rewrite时需要。
    )

    三、安装php
    # tar zxvf php-5.2.6.tar.gz
    # cd php-5.2.6,mkdir /usr/local/php5

    ./configure\
    “–prefix=/usr/local/php5″\
    “–with-apxs2=/usr/local/apache2/bin/apxs”\
    “–with-freetype-dir=/usr/lib”\
    “–with-mysql=/usr/local/mysql”\
    “–with-zlib-dir=/usr/lib”\
    “–with-libxml-dir=/usr/lib”\
    “–enable-shared”\
    “–with-curl=/usr/lib”\
    “–with-iconv”\
    “–enable-mbstring”\
    “–with-gd”\
    “–enable-gd-native-ttf”\
    “–enable-gd-jis-conv”\
    “–with-jpeg-dir=/usr/lib”\
    “–with-png-dir=/usr/lib”\
    “–enable-ftp”\
    “–enable-soap”\
    “–with-mcrypt=/usr/lib”\
    “–enable-sockets”\
    “–enable-force-cgi-redirect”\
    “–enable-inline-optimization”\
    “–disable-debug”\
    “–with-libexpat-dir=/usr/lib”\
    “–with-xsl=/usr/lib”\
    “–with-openssl=/usr”\
    “–enable-calendar”\
    “–with-config-file-path=/usr/local/php5/etc”\

    make;make install
    cp php.ini-dist  /usr/local/php5/etc/php.ini
    vi /usr/local/php5/etc/php.ini
    查找safe_mode=Off,更改为safe_mode=On
    1)查找max_execution_time = 30,更改为max_execution_time = 600
    (2)查找max_input_time = 60,更改为max_input_time = 600
    (3)查找memory_limit = 8M ,更改为memory_limit = 20M
    (4)查找display_errors = On,更改为display_errors = Off
    (5)查找register_globals = Off,更改为register_globals = On
    (6)查找post_max_size = 8M,更改为post_max_size = 20M
    (7)查找upload_max_filesize = 2M,更改为upload_max_filesize = 20M
    (8)查找session.auto_start = 0,更改为session.auto_start = 1
    执行:wq!命令保存后退出,从而完成了php.ini文件的配置工作。
    更改apache的配制文件:得加几行,目的是让apache能解释php程序。
    查找AddType application/x-tar .tgz  行,在下面添加
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php-source .phps
    找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php
    DirectoryIndex index.html index.html.var index.php
    现在apache就能够运行php了,写个文件测试一下,在/usr/local/apache/htdocs目录下,新建一个phpinfo.php文件,
    文件中只有一行代码:
    <? phpinfo(); ?>
    保存此文件, 在你的浏览器中输入http://localhost/phpinfo.php,你应该看到PHP的系统信息。
    如果出现错误,比如提示你下载phpinfo.php,那么apache就是还无法解析php文件,那么请仔细检查以上的操作是否正确.

    安装vim编辑器
    yum install -y vim
    yum install -y vim-minimal
    yum install -y vim-enhanced

    Posted in web server.

    Tagged with , , , , .


    .htaccess文件的使用

    通常,.htaccess文件使用的配置语法和主配置文件一样。AllowOverride指令按类别决定了.htaccess文件中哪些指令才是有效 的。如果一个指令允许在.htaccess中使用,那么在本手册的说明中,此指令会有一个覆盖项段,其中说明了为使此指令生效而必须在 AllowOverride指令中设置的值。

    Posted in web server.

    Tagged with , .