<-
Apache > HTTP Server > Documentation > Version 2.4

��������� ���� ����

������ ���:  en  |  es  |  fr  |  ja  |  ko  |  tr 

�� ������ �ֽ��� ������ �ƴմϴ�. �ֱٿ� ����� ������ ���� ������ �����ϼ���.

�������ʹ� ������ ������ �߻������� ����ġ�� ������ ������ �� �ִ�.

������ ������ ������ �߰������� ���� ��������� ������ ������ �� �ִ�.

��ũ��Ʈ�� ���� ��� "500 Server Error" ���� ��� ����ڿ��� �� ģ���� ������ ����ϰų� �ٸ� (���� ����Ʈ�� �ܺ� ����Ʈ��) URL�� �����̷����� �� �� �ִ�.

Support Apache!

����

top

�ൿ

���� �ൿ

NCSA httpd 1.3�� ����ڿ��� ���ǹ��ϰ� ������ �������� ���´�. ������ �߻��� ������ �α׿� ���� ���� ������.

���ο� �ൿ

������ ������ ���� ���� �� �� �ִ�:

  1. NCSA�� ������ ���� ��� �ٸ� ������ �����ְų�
  2. ���� ����Ʈ�� URL�� �����̷����ϰų�
  3. �ܺ� ����Ʈ�� URL�� �����̷����Ѵ�.

�ٸ� ����Ʈ�� URL�� �����̷����ϴ� ���� ������ �� ������, �� ��� ������ �����ϰų� �α��ϴµ� �ʿ��� ������ �Ϻθ� ���޵ȴ�.

������ ���� ������ �����ϱ����� ����ġ�� CGI���� ���ο� ȯ�溯���� �����Ѵ�:

REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, image/jpeg
REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 9000/712)
REDIRECT_PATH=.:/bin:/usr/local/bin:/etc
REDIRECT_QUERY_STRING=
REDIRECT_REMOTE_ADDR=121.345.78.123
REDIRECT_REMOTE_HOST=ooh.ahhh.com
REDIRECT_SERVER_NAME=crash.bang.edu
REDIRECT_SERVER_PORT=80
REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
REDIRECT_URL=/cgi-bin/buggy.pl

REDIRECT_ ���λ翡 �ָ��϶�.

�ּ��� REDIRECT_URL�� REDIRECT_QUERY_STRING�� (cgi-script�� cgi-include��) �� URL�� �Ѱ�����. �ٸ� ������ ������ �߻��ϱ� ������ (����; �̸����� REDIRECT_�� �� ȯ�溯����) ������ ��쿡�� �ִ�. ErrorDocument�� �ܺη� (���� ������ http:�� ���� ��Ŵ(scheme)���� �����Ѵٸ�) �����̷����Ѵٸ� ���� � �͵� �������� �ʴ´�.

top

����

AllowOverride�� ������ �����Ǿ��ٸ� .htaccess ���Ͽ��� ErrorDocument�� ����� �� �ִ�.

������ ���̴�...

ErrorDocument 500 /cgi-bin/crash-recover
ErrorDocument 500 "Sorry, our script crashed. Oh dear"
ErrorDocument 500 http://xxx/
ErrorDocument 404 /Lame_excuses/not_found.html
ErrorDocument 401 /Subscription/how_to_subscribe.html

������,

ErrorDocument <3-digit-code> <action>

������ action��,

  1. ����� ����. ����ǥ (")�� ���� �տ� ���δ�. �ڿ� ������ ����ǥ�� ��µȴ�. ����: �տ� ���� ����ǥ (")�� ��µ��� �ʴ´�.
  2. �����̷����� �ܺ� URL.
  3. �����̷����� ���� URL.
top

��������� ���� ����� �����̷���

URL�� �����̷����ϴ� ����ġ �ൿ�� ��ũ��Ʈ/server-include�� ȯ�溯���� �� �Ѱ��ֵ��� ����Ǿ���.

���� �ൿ

�����̷��ǵǴ� ��ũ��Ʈ�� ǥ�� CGI �������� �Ѿ��. ��𿡼� �����̷����� �Ͼ���� �� �� ����.

���ο� �ൿ

�����̷��ǵ� ��ũ��Ʈ�� ���ο� ȯ�溯������ ����� �� �ִ�. ��� �տ� REDIRECT_�� �پ��ִ�. REDIRECT_ ȯ�溯���� ���� CGI ȯ�溯���� �տ� REDIRECT_�� �ٿ��� �����. ���� ���, HTTP_USER_AGENT�� REDIRECT_HTTP_USER_AGENT�� �Ǿ���. �̷� ������ �߰��� ��ũ��Ʈ�� ���� URL�� �˵��� ����ġ�� REDIRECT_URL�� REDIRECT_STATUS�� �����Ѵ�. ���� URL�� �����̷��ǵ� URL ��� ���� �α׿� ����� �� �ִ�.

ErrorDocument�� ���� ������ �ִ� CGI ��ũ��Ʈ�� �����̷����Ѵٸ�, ��ũ��Ʈ�� Ŭ���̾�Ʈ���� ���� ��Ȳ�� Ȯ���� �����ϱ����� ��¿� "Status:" ��� �ʵ带 �����ؾ� �Ѵ�. ���� ���, Perl�� �ۼ��� ErrorDocument ��ũ��Ʈ�� ������ ����:

...
print "Content-type: text/html\n";
printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
...

404 Not Found�� ���� Ư�� ���� ��Ȳ�� ���� ��ũ��Ʈ���, ��� (����; ������) Ư�� �����ڵ�� �������� ����� �� �ִ�.

(Ŭ���̾�Ʈ���� �����̷����� ��û�ϱ�����) ���信 Location: ����� �����Ѵٸ�, ��ũ��Ʈ�� �ݵ�� (302 Found ����) ������ Status: ����� ����ؾ� ���� �����϶�. �׷��������� Location: ����� �ƹ� �ҿ���� �� �� �ִ�.

������ ���:  en  |  es  |  fr  |  ja  |  ko  |  tr 

top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.