1 、 vsftp 在安裝以後我們要進行以下操作。
a: 編輯
vi /etc/vsftpd/vsftpd.conf
在末尾加上
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
#以上 2 句控制用户在自己的目錄
pasv_enable=yes
pasv_promiscuous=no
pasv_max_port=33610
pasv_min_port=33601
#在 iptables 中設置允許 20,21 端口訪問服務器, 同時允許 33601-33610 端口訪問服務器
#asv_address
#以上用來指定 ftp 使用被動連接時的端口範圍.
chroot_list_file=/etc/vsftpd/chroot_list
#以上 2 句控制用户在自己的目錄
pasv_enable=yes
pasv_promiscuous=no
pasv_max_port=33610
pasv_min_port=33601
#在 iptables 中設置允許 20,21 端口訪問服務器, 同時允許 33601-33610 端口訪問服務器
#asv_address
#以上用來指定 ftp 使用被動連接時的端口範圍.
重啓
vsftpd /etc/init.d/vsftpd restart
2 、 WordPress 的 llsmp 中 nginx 配置文件:
server {
set $cache /wp-content/cache/supercache/$host;
listen ip:80;
server_name www.94seo.com;
location / {
root /home/wwwroot/www.94seo.com/html;
index index.html index.htm index.php;
add_header Content-Type 「text/html; charset=UTF-8″;
add_header Content-Encoding 「gzip」;
try_files $cache/$uri/index.html.gz @backend;
}
#以上是 WordPress 安裝了 supercache 插件後使用.
location ~ /.ht {
deny all;
}
#禁止訪問.htacess 文件.
location ~* .(jpg|jpeg|png|gif|css|js|swf|mp3|avi|flv|xml|zip|rar)$ {
root /home/wwwroot/www.94seo.com/html;
gzip on;
gzip_types text/plain application/x-javascript text/css application/xml;
expires 30d;
break;
}
#對靜態文件,nginx 自行處理,不用轉到後端服務器
location @backend {
proxy_pass http://127.0.0.1:80;
include proxy.conf;
}
#對於其他的文件,通過 backend 送到後端給 litespeed 處理
}
set $cache /wp-content/cache/supercache/$host;
listen ip:80;
server_name www.94seo.com;
location / {
root /home/wwwroot/www.94seo.com/html;
index index.html index.htm index.php;
add_header Content-Type 「text/html; charset=UTF-8″;
add_header Content-Encoding 「gzip」;
try_files $cache/$uri/index.html.gz @backend;
}
#以上是 WordPress 安裝了 supercache 插件後使用.
location ~ /.ht {
deny all;
}
#禁止訪問.htacess 文件.
location ~* .(jpg|jpeg|png|gif|css|js|swf|mp3|avi|flv|xml|zip|rar)$ {
root /home/wwwroot/www.94seo.com/html;
gzip on;
gzip_types text/plain application/x-javascript text/css application/xml;
expires 30d;
break;
}
#對靜態文件,nginx 自行處理,不用轉到後端服務器
location @backend {
proxy_pass http://127.0.0.1:80;
include proxy.conf;
}
#對於其他的文件,通過 backend 送到後端給 litespeed 處理
}