vsftpd搭建中的关键配置

mkdir -p /var/www
useradd -d /var/www/ftp -s /sbin/nologin <ftpuser>
chmod -R 755 /var/www/ftp
passwd <ftpuser>
echo "/sbin/nologin" >> /etc/shells

/etc/vsftpd/vsftpd.conf

anonymous_enable=NO
local_enable=YES
local_root=<website_root_dir>
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=NO
userlist_deny=NO
tcp_wrappers=YES
# userlist_file=/etc/vsftpd/user_list
pasv_enable=Yes
pasv_max_port=20000
pasv_min_port=21000

nginx配置ssl证书

server {
# 证书
listen 443 ssl ;
server_name <domain1> <domain2>;
ssl_certificate /etc/nginx/crt/<webname>.pem;
ssl_certificate_key /etc/nginx/crt/<webname>.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;

# HTTPS跳转
server {
listen 80 ;
server_name <domain1> <domain2>;
return 301 https://$server_name$request_uri;
}

免费空间

本文最后更新于1年前(2015-12-4 23:20:54),链接可能失效,内容可能难以复现。请注意甄别。
  2015-12-04 © Sunplace,2015

相同优点:免费、免备案、国外主机、有独立的固定IP

相同缺点:访问较慢

ping somee的主机

ping freehostia的主机

Somee有广告,只不过是一个文字连接。

<!--SCRIPT GENERATED BY SERVER! PLEASE REMOVE-->
<center><a href="https://somee.com">Web hosting by Somee.com</a></center>
</textarea></xml></script></noframes></noscript></object></layer></style></title></applet>
<script language="JavaScript" src="https://ads.mgmt.somee.com/serveimages/ad2/WholeInsert4.js"></script>
<!--SCRIPT GENERATED BY SERVER! PLEASE REMOVE-->

嵌入以下代码进行屏蔽:

<script language="JavaScript" type="text/javascript">
var lang = navigator.language || navigator.userLanguage;
if(lang.substr(0, 3) == "zh-"){
document.write("<style type=\"text/css\" media=\"screen\">center{display:none;}</style>"); }
</script>

000webhost也有广告,是一个相当醒目的弹框,只能去后台进行消除,不过之后仍会出现。