Monthly Archives: October 2014


windows 패스워드분실시
-> windows OS CD 부팅
-> 복구모드 -> 커맨드
-> 경로 D:\windows\system32
-> 명령어
move Utilman.exe Utilman.ex_
copy cmd.exe Utilman.exe
shutdown -r -t 화0
-> 재부팅 후 윈도우+U 키 로 커맨드창 불러옴.
-> 명령어
net user
net user Administrator Password
-> Password 에는 원하는 패스워드 정책실행시 정책에 알맞게할것
-> cmd창 닫고 로그인
-> 다시 OS CD로 부팅후 Utilman.ex_ 파일 원복
-> 끝
깨알팁!


1. PHP redirect
1
2
3
4
<?php
header( “HTTP/1.1 301 Moved Permanently” );
header( “Location: http://www.msnote.co.kr” );
?>
2. JSP(Java) redirect
1
2
3
4
5
< %
response.setStatus(301);
response.setHeader( “Location”, “http://www.msnote.co.kr/” );
response.setHeader( “Connection”, “close” );
%>
3. ASP.NET redirect
1
2
3
4
5
6
7
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,”http://www.msnote.co.kr”);
}
</script>
4. ASP redirect
1
2
3
4
5
< %@ Language=VBScript %>
< %
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://www.msnote.co.kr/”
%>
5. Ruby on Rails redirect
1
2
3
4
def old_action
headers[“Status”] = “301 Moved Permanently”
redirect_to “http://www.msnote.co.kr/”
end
6. CGI Perl redirect
1
2
$q = new CGI;
print $q->redirect(“http://www.msnote.co.kr/”);
7. .htaccess mod_rewrite
1
2
RewriteEngine on
RewriteRule (.*) http://www.msnote.co.kr/$1 [R=301,L]


1. Apache 환경 설정 파일
vi /usr/local/apache/conf/httpd.conf
변경전 Timeout 300
변경후 Timeout 1200클라이언트의 요청에 의해 서버와 연결이 되었을 때 클라이언트와 서버간에 아무런 메시지가 발생하지 않았을 때
오류로 처리될 시간을 초단위로 설정 합니다.
초기값은 1200이며 보통은 300초로 지정을 합니다. 네트웍의 속도가 나쁠수록 수치값은 높게 설정하는 것이 좋습니다..
변경전 KeepAliveTimeout 15
변경후 KeepAliveTimeout 30
아파치 서버는 같은 접속상태의 클라이언트에서 여기서 지정한 초만큼의 요청이 없었을 때 접속을 끊게 됩니다.
2. PHP 환경 설정 파일
vi /etc/php.ini
변경 전 session.gc_maxlifetime = 1440
변경 후 session.gc_maxlifetime = 10800
변경 전 session.cookie_lifetime = 0
변경 후 session.cookie_lifetime = 86400
변경 전 session.cache_limiter = nocache
변경 후 session.cache_limiter = nocache, must-revalidate
정정