<-
Apache > HTTP Server > Documentation > Version 2.4 > ���

����ġ ��� mod_expires

������ ���:  en  |  fr  |  ja  |  ko 

�� ������ �ֽ��� ������ �ƴմϴ�. �ֱٿ� ����� ������ ���� ������ �����ϼ���.
����:����ڰ� ������ ���ؿ� ���� Expires�� Cache-Control HTTP ����� �����Ѵ�
����:Extension
����:expires_module
�ҽ�����:mod_expires.c

���

�� ����� ���� ������ Expires HTTP ����� Cache-Control HTTP ����� max-age ���þ� ������ �����Ѵ�. �������� ������ ������ ������ �ð� Ȥ�� Ŭ���̾�Ʈ�� ������ �ð��� ��������� ������ �� �ִ�.

�� HTTP ������� Ŭ���̾�Ʈ���� ������ ��ȿ���� ���Ӽ��� �˷��ش�. �� �ð��� ���� �������ʾҴٸ�, ������ ij������ �����͵� �ȴ�. �������� �����ٸ� ij���� ���� "����ǰ�" ��ȿ���� �ʴٰ� �����Ͽ�, �ҽ����� ������ ���� ���;� �Ѵ�.

Header ���þ ����Ͽ� max-age ���� �ٸ� Cache-Control ���þ�(RFC 2616, 14.9 �� ����)�� ������ �� �ִ�.

���þ��

����

top

�ٸ� ���� ����

ExpiresDefault�� ExpiresByType ���þ �� �б� ���� �������� ����� �� �ִ�:

ExpiresDefault "<base> [plus] {<num> <type>}*"
ExpiresByType type/encoding "<base> [plus] {<num> <type>}*"

<base>�� ������ �ϳ��̴�:

plus Ű����� ��� �ȴ�. <num>�� [atoi()�� ����� �� �ִ�] �������̴�. <type>�� ������ �ϳ��̴�:

���� ���, ���� ��δ� ������ �⺻������ ���ӵ��� 1���Ŀ� ����ȴٰ� �����Ѵ�:

ExpiresDefault "access plus 1 month"
ExpiresDefault "access plus 4 weeks"
ExpiresDefault "access plus 30 days"

'<num> <type>' ������ �ݺ��ؼ� ����Ͽ� ����ð��� �ڼ��� ������ �� �ִ�:

ExpiresByType text/html "access plus 1 month 15 days 2 hours"
ExpiresByType image/gif "modification plus 5 hours 3 minutes"

���� �����ð�(modification)�� �������� ����ð��� �����ϴ� ��� ������ ��ũ�� �ִ� ���Ͽ��� �������� �ʴ´ٸ� Expires ����� ������ �ʴ´�. �� ��� ���뿡 �����ð��� ���� �����̴�.

top

ExpiresActive ���þ�

����:Expires ����� �����Ѵ�
����:ExpiresActive On|Off
������:�ּ�������, ����ȣ��Ʈ, directory, .htaccess
Override �ɼ�:Indexes
����:Extension
���:mod_expires

�� ���þ�� �ش� ������ ���� (��, .htaccess ���Ͽ��� ����Ѵٸ� �� ���丮 �Ʒ��� �ִ� �����鸸 �ش�ȴ�.) Expires�� Cache-Control ����� �������� ������ �����Ѵ�. (.htaccess ���� ������ �� ���� �ܰ迡�� ���������� ���������ʴ� ��) Off�̸� �ش� ������ �ִ� ������ �̵� ����� �������� �ʴ´�. On�̸� ExpiresByType�� ExpiresDefault ���þ�� (�ش� �׸��� �����϶�) ������ ��Ģ�� ���� �����Ϸ��� ������ �� ������� �����Ѵ�.

�� ���þ Expires�� Cache-Control ����� ���������� �ʴ´�. ��Ģ�� �ش����� �ʴٸ� ��ġ �� ���þ ���� ��ó�� ����� ������ �ʴ´�.

top

ExpiresByType ���þ�

����:MIME type���� Expires ������� �����Ѵ�
����:ExpiresByType MIME-type <code>seconds
������:�ּ�������, ����ȣ��Ʈ, directory, .htaccess
Override �ɼ�:Indexes
����:Extension
���:mod_expires

�� ���þ�� Ư�� ������ (���� ���, text/html) ������ ���� Expires ������� Cache-Control ����� max-age ���þ�� �����Ѵ�. �ι�° �ƱԸ�Ʈ�� ����ð��� �����Ҷ� ���� �ð��� ���� �ʴ��� ���� �����Ѵ�. Cache-Control: max-age�� ����ð����� ��û�� �ð��� ���� ����ϰ�, ����� �ʴ����� ǥ���Ѵ�.

���� �ð��� ������ �ֱ� �����ð� Ȥ�� Ŭ���̾�Ʈ�� ������ ������ �ð��̴�. �̶� ���� ��������� <code> �ʵ�� �����ؾ� �Ѵ�. M�� ���� �ð����� ������ �ֱ� �����ð��� ����ϰ�, A�� Ŭ���̾�Ʈ�� ���� �ð��� ����Ѵ�.

���̴� �̹��ϴ�. M�� ����ϸ� ij���� �ִ� ��� ���纻�� ���� �ð��� ����ȴ�. �׷��� �׻� ���� URL�� ã�ƺ� �� �ִ� �ְ����� ���� �뵵�� ����. A�� ����ϸ� ���纻�� ����ð��� ���� �ٸ���. �̴� ���� ���������ʴ� �׸����Ͽ�, Ư�� ���� �������� ���� �׸��� �����Ҷ� (���� ���, �̹����� ��������� ª�� �Ⱓ���� �ݺ��ؼ� ���ٵȴ�), �����ϴ�.

����:

# ��������� ����Ѵ�
ExpiresActive On
# Ŭ���̾�Ʈ ij���� GIF �׸��� �� ���Ŀ� �����Ѵ�
ExpiresByType image/gif A2592000
# HTML ������ ������ �����ϰ� ��ȿ�ϴ� ExpiresByType text/html M604800

�� ���þ�� ExpiresActive On�� ����Ҷ��� ��ȿ���� �����϶�. ExpiresDefault ���þ ����Ͽ� Ư�� MIME type�� ���ؼ��� ����ð��� ������ �� �ִ�.

�տ��� ������ �ٸ� ������ ����Ͽ� ����ð��� ����� ���� �ִ�.

top

ExpiresDefault ���þ�

����:����ð��� ����ϴ� �⺻ �˰�����
����:ExpiresDefault <code>seconds
������:�ּ�������, ����ȣ��Ʈ, directory, .htaccess
Override �ɼ�:Indexes
����:Extension
���:mod_expires

�� ���þ�� �ش� ������ �ִ� ��� ������ ����ð��� ����ϴ� �⺻ �˰������� �����Ѵ�. ExpiresByType ���þ ����Ͽ� �������� ������ �� �ִ�. �ƱԸ�Ʈ ������ ���� �ڼ��� ������ �� ���þ�� �ٸ� ������ �����϶�.

������ ���:  en  |  fr  |  ja  |  ko 

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.