review what i studied `date` - 2017-4-12
python接続文字列int+srt
コマンドを実行し、返された値をリストに変換します.
Apache autoindex中国語の文字化けし問題を解決するautoindex.confファイルには独自のエンコード設定があります
プロファイルに行を追加
smb.confで新しく学んだパラメータ
nginxはクライアントIPアドレスのリダイレクトアドレスを識別することを実現する
>>> a = 1
>>> b = 'xuhui'
>>> a + b
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported operand type(s) for +: 'int' and 'str'
>>> b + str(a)
'xuhui1'
# int
コマンドを実行し、返された値をリストに変換します.
>>> import os
>>> os.popen('ls').read().split()
['autoindex.conf', 'fcgid.conf', 'meterial.conf', 'php.conf', 'README', 'ssl.conf', 'userdir.conf', 'zabbix.conf', 'zabbix.conf.rpmsave']
Apache autoindex中国語の文字化けし問題を解決するautoindex.confファイルには独自のエンコード設定があります
プロファイルに行を追加
IndexOptions Charset=UTF-8
#GBK|GB2312
smb.confで新しく学んだパラメータ
inherit acls = yes acl
create mask = 0664
nginxはクライアントIPアドレスのリダイレクトアドレスを識別することを実現する
if ($remote_addr ~* ^10\.1\.1\.(.*?)$)
{
rewrite ^(.*)$ http://10.1.1.101/;
}
# 10.1.1.0 10.1.1.101
$1
# :
if ($remote_addr ~* ^10\.1\.1\.(.*?)$)
{
rewrite ^(.*)$ http://10.1.1.101$1;
}
$1 “^(.*)$”
#
10.1.1.1/web
“^(.*)$” “/web”, # 10.1.1.101/web
# :
if ($remote_addr ~* ^10\.1\.1\.(.*?)$)
{
set $uip $1
return 403 "Forbidden 10.1.1.$uip";
}
# $1 “(.*?)” $uip
Forbidden #10.1.1.254