Apache HTTP Server Version 2.4
문 2 URL �'� 9� �� 빤 � �$ 9� 찾' �
�( 모 | �( '/th> |
---|---|
|
|
2 � 9 � � 빤
' 결기 기본� 2 URL-경(URL �$
�� �
� � ��)� �<� ' DocumentRoot
� 붸 그 DocumentRoot
섟� 리� � 보
기본 �)4
"" �$
DocumentRoot
' �� � 근
� 9 경 ��
' 방 �)
�
Ш섯� �)
�$
ㅈ� �� DocumentRoot
보 9 � 리 Options
� FollowSymLinks
SymLinksIfOwnerMatch
� 경0� Ш섯� ��
, Alias
� �$
� �� 물�� � � �� 갤면
Alias /docs /var/web
URL http://www.example.com/docs/dir/file.html
/var/web/dir/file.html
�'� 빤
' 경 모 �) CGI �
Ц�� 취
� �
� ScriptAlias
� � �
AliasMatch
ScriptAliasMatch
� �%
런� � 9� �)
�
� �%
� �
ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2
http://example.com/~user/cgi-bin/script.cgi
� 2 경 /home/user/cgi-bin/script.cgi
� �, � � CGI �
Ц�� 취
�
�<� � �) user 리 ~user/
� '9 mod_userdir
모 � ��' �
�� � URL �'� � �) � � 빤
http://www.example.com/~user/file.html
보 � �) 리 ' 근
섯� 그 UserDir
� �) 리 � �� 리 ' 기본 � Userdir public_html
�)
� /home/user/
� /etc/passwd
' �) 리桓�, URL /home/user/public_html/file.html
, Userdir
� /etc/passwd
리 9� �' �
� ㅈ� � �)
� � (보
� %7e
� �)) "~" 기
�
� ㅈ� 방<� �) 리 �
�4
기� mod_userdir 공
' 그� �) 리
�9 방� 구1訝�, AliasMatch
� �)
��� � � � � AliasMatch
� �)
� http://www.example.com/upages/user/file.html
/home/user/public_html/file.html
AliasMatch ^/upages/([a-zA-Z0-9]+)/?(.*) /home/$1/public_html/$2
� � �� 9� �$
� � �) ��48
�� 보�
� 그� � 2 �) ㅈ� URL �
��48
�� ㅑ� ��48
�
� � URL 2� � � " � � 리�4(redirection)��
� Redirect
� �)
� � DocumentRoot
/foo/
리 �) � /bar/
리 ��ㅈ� �� � ��48
�
� 9� 2�
Redirect permanent /foo/ http://www.example.com/bar/
그痢� www.example.com
� /foo/
� URL-경 /foo/
� /bar/
� �� URL� 리�4 ��48
� 섯 � ㅈ� �� 리�4
, 9 복!
� 문� RedirectMatch
� 공
� � ㅈ� 2 그� � �4
� 2 ㅈ� �4
� 리�4訝�:
RedirectMatch permanent ^/$ http://www.example.com/startpage.html
� �4 � 모 �� ㅈ� �4 � � �� 리�4訝�:
RedirectMatch temp .* http://othersite.example.com/startpage.html
9 ㅈ� � 문� � URL 공� 갸 경 ��� � � 문� 갸 ��48 �� � � � � 기문 � 방 �(reverse proxying)� ��48 � � � �� 문� 보賤� �2 보4� � � ㅈ�
� ��48
�
/foo/
문� 2� � internal.example.com
/bar/
리 문� 갸 문� �9 � �2 ��48
�� 보�
ProxyPass /foo/ http://internal.example.com/bar/
ProxyPassReverse /foo/ http://internal.example.com/bar/
ProxyPass
�� 문� 갸$� �� ProxyPassReverse
� internal.example.com
보� 리�4 �1
리�4 � 리 갭�
�� , ProxyPassReverseCookieDomain
� ProxyPassReverseCookieDomain
� 방� �� 보 쿤 �1
그� 문 맬 �1
' 주 internal.example.com
맬 ��48
�
��� internal.example.com
� ' 2� �� � mod_proxy_html 모 �)
HTML� XHTML 맬 �1
�%
9 mod_rewrite
� ' 모 � �<0 "� ��48
� IP 주 2 � �'� � �) 빤
' 결 , mod_rewrite 2 ��
2리
' 결기 � �4
�� �4 塑�� �)
� ' ㅇ� "� , &, � 리�4 (alias), � 리�4, �, 모� ' mod_rewrite� �)
� URL '침 �
결국 2 URL � �$ 찾 못 경04 � �' �� � 경 문� ㅈ� 곳<� ��� 문 경 ��48 �� URL 리�4� � 9� ㅑ� 방 " 그痢� �� � 嗤� 맬 � �
"File Not Found" � ㅈ� � � �<0 ' � HTML 맬 URL � � 경04 9 mod_speling
(盈� 리 ) 모� � � 문� 모 �)
� "File Not Found" �� � 경 푮
� �' 찾 � 臍�
� mod_speling ��48
� �� 9� HTTP 리�4 "푮
" � ��
ㅈ� ��48
�� 목 보�
mod_speling � � � 문� 구'� � �� 기�4 그 �$ � URL 문 � '못 �)� � 그� mod_speling # URL 넋� ㅈ�, "못" 2� URL 리�4� ��48 � � 2 �4�� � 슈
찾 � 모 �
�
� 9 HTTP status code 404 (file not found) ��� 보� � �) ErrorDocument
� 조� �) � /a> 문� 참
�)