V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  extreme  ›  全部回复第 17 页 / 共 24 页
回复总数  478
1 ... 9  10  11  12  13  14  15  16  17  18 ... 24  
2015-02-21 17:45:49 +08:00
回复了 holinhot 创建的主题 NGINX apache 重写怎么转 nginx
@ryd994 Amazing!
2015-02-21 16:17:45 +08:00
回复了 holinhot 创建的主题 NGINX apache 重写怎么转 nginx
@louishothot 刚刚测试了一下,发现一点问题,这个是完善的版本:
rewrite "^/(.*)\.php(/){0,}$" /$1 permanent;
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/.*$ $fastcgi_script_name.php last;
}
2015-02-21 15:55:42 +08:00
回复了 holinhot 创建的主题 NGINX apache 重写怎么转 nginx
@louishothot
试试这个:
rewrite ^/(.*)\.php$ /$1 permanent;
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/.*$ $fastcgi_script_name.php?$query_string last;
}
2015-02-21 10:19:13 +08:00
回复了 holinhot 创建的主题 NGINX apache 重写怎么转 nginx
虽然我第一个使用的HTTP Server是Apache,但我开始自己写rewrite却不是Apache,而是Nginx,因此对mod_rewrite的语法不太了解。
也许你可以尝试说明用途(预期效果),而不是给mod_rewrite的规则,说不定别人更容易帮到你。
@Helen 在附言补上了哦!
@Yamade 10 Mbps
@Yamade 已经在附言处补上了哦。
2015-02-20 08:39:59 +08:00
回复了 inet6 创建的主题 问与答 收到 Digital Ocean 一封邮件(Abuse Complaint), 这个应该咋处理啊?
DNS用的是UDP协议,有人伪造来源,向你发出DNS查询的请求,你的DNS服务器就把回应的数据包发送给“所宣称的来源IP”,由于请求次数多,频率高,因此就实现了“借DNS服务器发动DDOS攻击”的目标。

如果不是公用DNS服务器,只提供给本机用,就让BIND只Listen 127.0.0.1:53吧。
目前的解决方案是:
在LV1中创建卷组,以及LV(LV-INSIDELVM),在LV-INSIDELVM中部署环境。
使用QCOW2的backing_file参数创建QCOW2的虚拟磁盘文件,另外使用LVCREATE创建一个比QCOW2虚拟磁盘文件大的普通的LV(LV-FOR-QCOW2)。
使用backing_file的QCOW2 IO虽然低下,但比使用LVM创建的快照好,并且貌似不会对LV-INSIDELVM的性能产生太大(可能是无影响,性能与未做快照前相当,当然这里还不能下结论)的影响。

由于使用了backing_file,因此QCOW2虚拟磁盘文件中会有一个一模一样的LV-INSIDELVM,把LV-FOR-QCOW2加入到QCOW2虚拟磁盘文件的卷组中,再resize LV和分区。

由于LV-FOR-QCOW2是非快照,亦未被快照,因此INPUT/OUTPUT性能优越,加入QCOW2虚拟磁盘文件的VG中后,可以让写入QCOW2虚拟磁盘文件的数据写入到该LV中,因此实现了INPUT/OUTPUT性能的优化。

以下是测试结果:
未使用LV-FOR-QCOW2:
root@debian:~# dd if=/dev/zero of=/mnt/qcow2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 9.52313 s, 110 MB/s
root@debian:~# dd if=/dev/zero of=/mnt/qcow2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 13.4839 s, 77.8 MB/s
root@debian:~# dd if=/dev/zero of=/mnt/qcow2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 8.42614 s, 124 MB/s

LV-FOR-QCOW2的性能:
root@debian:~# dd if=/dev/zero of=/mnt/LV-FOR-QCOW2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 2.94569 s, 356 MB/s
root@debian:~# dd if=/dev/zero of=/mnt/LV-FOR-QCOW2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 1.60771 s, 652 MB/s
root@debian:~# dd if=/dev/zero of=/mnt/LV-FOR-QCOW2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 1.52536 s, 687 MB/s
root@debian:~# dd if=/dev/zero of=/mnt/LV-FOR-QCOW2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 1.50046 s, 699 MB/s
root@debian:~# dd if=/dev/zero of=/mnt/LV-FOR-QCOW2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 1.56133 s, 672 MB/s

使用LV-FOR-QCOW2扩充后的性能:
root@debian:~# dd if=/dev/zero of=/mnt/qcow2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 1.71546 s, 611 MB/s
root@debian:~# dd if=/dev/zero of=/mnt/qcow2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 1.52238 s, 689 MB/s
root@debian:~# dd if=/dev/zero of=/mnt/qcow2/test bs=4k count=256000 conv=fdatasync
256000+0 records in
256000+0 records out
1048576000 bytes (1.0 GB) copied, 1.51794 s, 691 MB/s
2015-02-18 22:07:20 +08:00
回复了 extreme 创建的主题 SSH 如何让 MOSH 在终端处保留更多的内容?
@lucifer9 一直在screen里面……
2015-02-18 21:01:46 +08:00
回复了 extreme 创建的主题 SSH 如何让 MOSH 在终端处保留更多的内容?
@Tink 比用more还麻烦,治标不治本……
2015-02-18 19:58:32 +08:00
回复了 extreme 创建的主题 Linux 有没有什么办法可以在 MT7620A 上运行 Debian Mipsel Chroot
@besto 感谢,这个方法挺好的!不过搬到OpenWRT上,还是那些错误……
2015-02-18 09:36:52 +08:00
回复了 extreme 创建的主题 Linux 有没有什么办法可以在 MT7620A 上运行 Debian Mipsel Chroot
@squid157 我的想法是用OpenWRT的Tool Chain编译Debian Wheezy,不过没找到相关资料。
2015-02-17 15:33:23 +08:00
回复了 extreme 创建的主题 Linux 有没有什么办法可以在 MT7620A 上运行 Debian Mipsel Chroot
@WorkTimer 可以直接安装?用什么输出画面的……
@mahone3297 不能说是限制吧,是由EXT这种格式的特点,数据不是按顺序写入到BLOCK里面的,需要在INODES里面记录BLOCK的位置,当然不仅是BLOCK的位置信息,还有其它的。
更多的你通过搜索引擎了解吧,当年看了书,就记得大概的。
@mahone3297 半虚拟化和全虚拟化的磁盘INODES都是可以自定义的,因为你有权限操作储存设备文件。
不过半虚拟化要更改“/”的确有点难。
当然也不是没有解决办法,别忘了有/dev/loop[0-9]+。

恐怕仅有OpenVZ那类,类chroot的可以真正的限制你的INODES了……
2015-02-17 11:33:00 +08:00
回复了 qazplkm 创建的主题 SSH ssh 连 vps 操作一顿一顿的,是为何?
@sandtears 那个好像不能指定MOSH的UDP端口?
@xiaozhizhu1997 支持,提供SCP,SFTP,FTP协议上传ISO。
2015-02-16 20:02:56 +08:00
回复了 qazplkm 创建的主题 SSH ssh 连 vps 操作一顿一顿的,是为何?
@zzutmebwd 原来有这东西哈!我的服务器安装了mosh,一直忧愁Windows没客户端……
@zjgood 那个NOVNC可以使用呀,昨晚我测试过了。
1 ... 9  10  11  12  13  14  15  16  17  18 ... 24  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1662 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms · UTC 16:51 · PVG 00:51 · LAX 09:51 · JFK 12:51
Developed with CodeLauncher
♥ Do have faith in what you're doing.