nginx - ij½¬µÈ ÆäÀÌÁö »èÁ¦

   Á¶È¸ 9877   Ãßõ 0    

nginx에서 ~user 접속이 가능하게 설정 테스트를 하다가

http://2cpu.co.kr/QnA/517688


php가 동작 안해서 프로그램이 보이는 페이지가 나왔습니다.

그 페이지가 웹브라우져에 캐쉬 된 것 같습니다.

계속 같은 페이지가 나와요. -..-...


IE11에서는 cahce 등등을 모두 삭제하니 됬는데

크롬은 웹페이지가 파일로 다운되고 있는데

캐쉬를 삭제 안하고 해결할 방법을 찾고 싶습니다


설정파일에서 expires를 제어하는 것으로는 안됩니다.

    # Define default caching of 0s
    expires 0s;
    add_header Pragma public;
    add_header Cache-Control "max-age=0, public, must-revalidate, proxy-revalidate";


nginx의 관리상의 정신적인 피곤함은 상당하네요.

웹서버를 50% 더 늘리고 apache로 가는 것이 편할지도.


/etc/nginx/conf.d/default.conf


server {
    listen       80;
    server_name  localhost;

    port_in_redirect off;
    server_tokens off;
    autoindex off;

    client_max_body_size 20m;
    client_body_buffer_size 128k;

    # Define default caching of 24h
    #expires 86400s;
    #add_header Pragma public;
    #add_header Cache-Control "max-age=86400, public, must-revalidate, proxy-revalidate";

    root   /home/peoplenjob/public_html/;
    #root   /usr/share/nginx/html;

    index  index.php index.html index.htm;

    #charset koi8-r;
    #access_log  /var/log/nginx/log/host.access.log  main;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\. {
        deny  all;
    }

}

- to be continue -
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.
ÇÁ¸®¿ë 2016-03
Áú¹®¿¡ ¸Â´Â ´äº¯ÀÎÁö ¸ð¸£°Ú½À´Ï´Ù¸¸.
Å©·Ò °³¹ßÀÚ µµ±¸¿¡¼­ Network -> Disable Cache¸¦ ÄÑ°í Å×½ºÆ®¸¦ ÇÏ½Ã¸é µÇÁö ¾ÊÀ»±îÇÕ´Ï´Ù.
     
ȸ¿øK 2016-03
°³¹ßÁß¿¡´Â µµ±¸¸¦ ¾µ ¼ö ÀÖÁö¸¸, Live »óÅ¿¡¼­ ÀÌ·± ÀÏÀÌ »ý±â¸é ¾î¶»°Ô ÇØ¾ß ÇÒ±î¿ä?
±¸±ÛÀ» º¸´Ï °ü·ÃµÈ À̽´µéÀÌ ¸¹Àº °Í °°Àºµ¥, ´äÀ» ¸ø ã°í ÀÖ½À´Ï´Ù.


QnA
Á¦¸ñPage 2394/5657
2014-05   4859695   Á¤ÀºÁØ1
2015-12   1404938   ¹é¸Þ°¡
2010-03   11222   ÀϹÝÀ¯Àú
2014-10   5018   º¹ºÎºñ¸¸
2019-05   3197   ÀßÇÏÀÚ
2018-03   3404   ±×¸°
2021-12   2788   ´ÃÆĶõ
2013-05   5292   ±èȲÁß
2014-11   18109   ³ªÆÄÀÌ°­½ÂÈÆ
2010-05   9525   ÀÌÀÎ
2016-02   6436   ShadowM
2013-05   5171   SkyBase
2014-11   3396   ¾Æ¸§´Ù¿î³ëÀ»
2019-05   2070   »ßµ¹À̽½ÇÄÀÌ
2019-05   2437   ´ÃÆĶõ
2010-05   8100   ±èÁ¤Áß
2013-06   8770   ±è¼®È¯
2016-02   4232   jang
2018-04   3909   ³ª¶ó»ç¶û
2023-09   1428   ±¸Â÷´Ï
2018-04   23415   Á¤ÀǼ®
2023-09   955   L2½ºÀ§Ä¡