2ちゃんねる ■掲示板に戻る■ 全部 1- 最新50    

■ このスレッドは過去ログ倉庫に格納されています

【技術者】難しい話をするスレ【Haskell】

1 :名無しさん:2014/05/22(木) 00:02:01.28
雑談スレで話すとROMっちゃうお嬢様方に配慮して
サーバーやプログラム等の難しい話はこっちでするスレ

281 :名無しさん:2015/08/13(木) 23:53:59.89 ID:gpY0A1EJl
cのMPMはeventに変更し下記のようにしてみました。
<IfModule event.c>
ServerLimit         1024
StartServers        1024
MaxClients        1024
MinSpareThreads    128
MaxSpareThreads    512
ThreadsPerChild   64
MaxRequestsPerChild 512
</IfModule>

282 :名無しさん:2015/08/13(木) 23:54:23.66 ID:gpY0A1EJl
cのmod_fcgid設定です。
<IfModule mod_fcgid.c>
<IfModule !mod_fastcgi.c>
    AddHandler fcgid-script fcg fcgi fpl
</IfModule>

SocketPath run/mod_fcgid
SharememPath run/mod_fcgid/fcgid_shm
AddType text/html .php
DirectoryIndex index.php

IdleTimeout 20
ProcessLifeTime 60
MaxProcessCount 50
DefaultMaxClassProcessCount 100
DefaultMinClassProcessCount 10
IPCConnectTimeout 30
IPCCommTimeout 30
DefaultInitEnv RAILS_ENV production
IdleScanInterval 10
</IfModule>

283 :名無しさん:2015/08/13(木) 23:55:59.02 ID:gpY0A1EJl
cのmod_dosdetector設定です。
DoSDetection On
DoSPeriod 10
DoSThreshold 10
DoSHardThreshold 20
DoSBanPeriod 3600
DoSTableSize 100
DoSIgnoreContentType image/*
RewriteEngine On
AddType image/vnd.microsoft.icon .ico
RewriteCond %{ENV:SuspectHardDoS} =1
RewriteCond %{REMOTE_ADDR} !^(127\.0\.0\.1)$
RewriteCond %{REMOTE_ADDR} !^(10\.[0-9]+\.[0-9]\.[0-9])$
RewriteCond %{REMOTE_ADDR} !^(172\.(1[6-9]|2[0-9]|3[0-1])\.[0-9]+\.[0-9]+)$
RewriteCond %{REMOTE_ADDR} !^(192\.168\.[0-9]+\.[0-9]+)$
RewriteCond %{HTTP_USER_AGENT} !(google|yahoo|msn|bing) [NC]
RewriteRule .* - [R=503,L]
ErrorDocument 503 "Server is busy."

284 :名無しさん:2015/08/14(金) 09:03:34.44
REMOTE_ADDR がループバックやプライベートIPなら
SERVER_ADDR も必然的にループバックやプライベートIPになるので
それを生かせば REMOTE_ADDR の判定のところはもっと簡素化できるかも

例えば SERVER_ADDR が 49.212.27.62 か否かで判定すれば1行だけで済む
…とはいえ、グローバルIPが変わった場合に面倒かな…

総レス数 356
109 KB
新着レスの表示

掲示板に戻る 全部 前100 次100 最新50
read.cgi ver 2014.07.20.01.SC 2014/07/20 D ★