Expires directive returned in the ngix server response headernginx does not close socketCan nginx be made to...

When traveling to Europe from North America, do I need to purchase a different power strip?

PTIJ: wiping amalek’s memory?

In the quantum hamiltonian, why does kinetic energy turn into an operator while potential doesn't?

Is it necessary to separate DC power cables and data cables?

Does "Until when" sound natural for native speakers?

Do I really need to have a scientific explanation for my premise?

Find longest word in a string: are any of these algorithms good?

How is the wildcard * interpreted as a command?

Why does the negative sign arise in this thermodynamic relation?

meaning and function of 幸 in "则幸分我一杯羹"

Why does Captain Marvel assume the people on this planet know this?

Can one live in the U.S. and not use a credit card?

How strictly should I take "Candidates must be local"?

Can I pump my MTB tire to max (55 psi / 380 kPa) without the tube inside bursting?

How can I get players to stop ignoring or overlooking the plot hooks I'm giving them?

Should I tell my boss the work he did was worthless

Recommendation letter by significant other if you worked with them professionally?

What's the "normal" opposite of flautando?

What Happens when Passenger Refuses to Fly Boeing 737 Max?

Does this video of collapsing warehouse shelves show a real incident?

Database Backup for data and log files

When a wind turbine does not produce enough electricity how does the power company compensate for the loss?

In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?

Are tamper resistant receptacles really safer?



Expires directive returned in the ngix server response header


nginx does not close socketCan nginx be made to cache upstream responses containing an X-Accel-Redirect header?Cache-control for permanent 301 redirects nginxApache / Nginx / Varnish - GZIP does not work on css, jsUpdate Cache-Control max-age when srcache returns response from cacheNginx, charset directive not working when sending 301 redirectNginx: using X-Accel-Expires with Cache-ControlHow do I add no-cache headers to all 404 pages served by apache and nginx?AWS S3, CloudFront, web font CORS errornginx proxy caching not working













1















I have configures Nginx as reverse proxy/caching server to my apache webserver.



In the nginx config file I have setting of expires 30D at the server level. My apache config file has no expires directive , i mean no directive in the file.
When I inspect my server response headers wchih seem to come from Nginx, I see the following for my http://www.example.com request:



****HTTP/200 responses are cacheable by default, unless Expires, Pragma, or Cache-Control headers are present and forbid caching.
HTTP/1.0 Expires Header is present: Thu, 19 Nov 1981 08:52:00 GMT
Legacy Pragma Header is present: no-cache**



Can someone please suggest what is wrong , i want to set the expires to 1 month from now but it shows Thu, 19 Nov 1981 08:52:00 GMT.



Where should i start?










share|improve this question














bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    1















    I have configures Nginx as reverse proxy/caching server to my apache webserver.



    In the nginx config file I have setting of expires 30D at the server level. My apache config file has no expires directive , i mean no directive in the file.
    When I inspect my server response headers wchih seem to come from Nginx, I see the following for my http://www.example.com request:



    ****HTTP/200 responses are cacheable by default, unless Expires, Pragma, or Cache-Control headers are present and forbid caching.
    HTTP/1.0 Expires Header is present: Thu, 19 Nov 1981 08:52:00 GMT
    Legacy Pragma Header is present: no-cache**



    Can someone please suggest what is wrong , i want to set the expires to 1 month from now but it shows Thu, 19 Nov 1981 08:52:00 GMT.



    Where should i start?










    share|improve this question














    bumped to the homepage by Community 1 min ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      1












      1








      1








      I have configures Nginx as reverse proxy/caching server to my apache webserver.



      In the nginx config file I have setting of expires 30D at the server level. My apache config file has no expires directive , i mean no directive in the file.
      When I inspect my server response headers wchih seem to come from Nginx, I see the following for my http://www.example.com request:



      ****HTTP/200 responses are cacheable by default, unless Expires, Pragma, or Cache-Control headers are present and forbid caching.
      HTTP/1.0 Expires Header is present: Thu, 19 Nov 1981 08:52:00 GMT
      Legacy Pragma Header is present: no-cache**



      Can someone please suggest what is wrong , i want to set the expires to 1 month from now but it shows Thu, 19 Nov 1981 08:52:00 GMT.



      Where should i start?










      share|improve this question














      I have configures Nginx as reverse proxy/caching server to my apache webserver.



      In the nginx config file I have setting of expires 30D at the server level. My apache config file has no expires directive , i mean no directive in the file.
      When I inspect my server response headers wchih seem to come from Nginx, I see the following for my http://www.example.com request:



      ****HTTP/200 responses are cacheable by default, unless Expires, Pragma, or Cache-Control headers are present and forbid caching.
      HTTP/1.0 Expires Header is present: Thu, 19 Nov 1981 08:52:00 GMT
      Legacy Pragma Header is present: no-cache**



      Can someone please suggest what is wrong , i want to set the expires to 1 month from now but it shows Thu, 19 Nov 1981 08:52:00 GMT.



      Where should i start?







      nginx






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 5 '12 at 0:43









      AndyAndy

      62




      62





      bumped to the homepage by Community 1 min ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 1 min ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          If you are using Apache behind Nginx, then I assume you have a dynamic site. So, I guess http://www.yoursite.com serves dynamic content. By default, Nginx sets expires only for static files. So, please do the same test for a static file such as http://www.yoursite.com/style.css and you might notice the difference now.






          share|improve this answer
























          • I placed the following directive in nginx.confI checked the Expires tag for static content.

            – Andy
            Feb 5 '12 at 2:18











          • i placed the following config in nginx.conf location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 60d; }

            – Andy
            Feb 5 '12 at 2:19











          • and restarted the server. still it shows me the Thu, 19 Nov 1981 08:52:00 GMT for the expires value. please help.

            – Andy
            Feb 5 '12 at 2:20











          • You may want to add the following just after/before expires directive that sets the max-age to 10hours... add_header Cache-Control "max-age=86400, public, must-revalidate"

            – Pothi Kalimuthu
            Feb 5 '12 at 4:12













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f356927%2fexpires-directive-returned-in-the-ngix-server-response-header%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          If you are using Apache behind Nginx, then I assume you have a dynamic site. So, I guess http://www.yoursite.com serves dynamic content. By default, Nginx sets expires only for static files. So, please do the same test for a static file such as http://www.yoursite.com/style.css and you might notice the difference now.






          share|improve this answer
























          • I placed the following directive in nginx.confI checked the Expires tag for static content.

            – Andy
            Feb 5 '12 at 2:18











          • i placed the following config in nginx.conf location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 60d; }

            – Andy
            Feb 5 '12 at 2:19











          • and restarted the server. still it shows me the Thu, 19 Nov 1981 08:52:00 GMT for the expires value. please help.

            – Andy
            Feb 5 '12 at 2:20











          • You may want to add the following just after/before expires directive that sets the max-age to 10hours... add_header Cache-Control "max-age=86400, public, must-revalidate"

            – Pothi Kalimuthu
            Feb 5 '12 at 4:12


















          0














          If you are using Apache behind Nginx, then I assume you have a dynamic site. So, I guess http://www.yoursite.com serves dynamic content. By default, Nginx sets expires only for static files. So, please do the same test for a static file such as http://www.yoursite.com/style.css and you might notice the difference now.






          share|improve this answer
























          • I placed the following directive in nginx.confI checked the Expires tag for static content.

            – Andy
            Feb 5 '12 at 2:18











          • i placed the following config in nginx.conf location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 60d; }

            – Andy
            Feb 5 '12 at 2:19











          • and restarted the server. still it shows me the Thu, 19 Nov 1981 08:52:00 GMT for the expires value. please help.

            – Andy
            Feb 5 '12 at 2:20











          • You may want to add the following just after/before expires directive that sets the max-age to 10hours... add_header Cache-Control "max-age=86400, public, must-revalidate"

            – Pothi Kalimuthu
            Feb 5 '12 at 4:12
















          0












          0








          0







          If you are using Apache behind Nginx, then I assume you have a dynamic site. So, I guess http://www.yoursite.com serves dynamic content. By default, Nginx sets expires only for static files. So, please do the same test for a static file such as http://www.yoursite.com/style.css and you might notice the difference now.






          share|improve this answer













          If you are using Apache behind Nginx, then I assume you have a dynamic site. So, I guess http://www.yoursite.com serves dynamic content. By default, Nginx sets expires only for static files. So, please do the same test for a static file such as http://www.yoursite.com/style.css and you might notice the difference now.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 5 '12 at 1:49









          Pothi KalimuthuPothi Kalimuthu

          3,72911733




          3,72911733













          • I placed the following directive in nginx.confI checked the Expires tag for static content.

            – Andy
            Feb 5 '12 at 2:18











          • i placed the following config in nginx.conf location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 60d; }

            – Andy
            Feb 5 '12 at 2:19











          • and restarted the server. still it shows me the Thu, 19 Nov 1981 08:52:00 GMT for the expires value. please help.

            – Andy
            Feb 5 '12 at 2:20











          • You may want to add the following just after/before expires directive that sets the max-age to 10hours... add_header Cache-Control "max-age=86400, public, must-revalidate"

            – Pothi Kalimuthu
            Feb 5 '12 at 4:12





















          • I placed the following directive in nginx.confI checked the Expires tag for static content.

            – Andy
            Feb 5 '12 at 2:18











          • i placed the following config in nginx.conf location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 60d; }

            – Andy
            Feb 5 '12 at 2:19











          • and restarted the server. still it shows me the Thu, 19 Nov 1981 08:52:00 GMT for the expires value. please help.

            – Andy
            Feb 5 '12 at 2:20











          • You may want to add the following just after/before expires directive that sets the max-age to 10hours... add_header Cache-Control "max-age=86400, public, must-revalidate"

            – Pothi Kalimuthu
            Feb 5 '12 at 4:12



















          I placed the following directive in nginx.confI checked the Expires tag for static content.

          – Andy
          Feb 5 '12 at 2:18





          I placed the following directive in nginx.confI checked the Expires tag for static content.

          – Andy
          Feb 5 '12 at 2:18













          i placed the following config in nginx.conf location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 60d; }

          – Andy
          Feb 5 '12 at 2:19





          i placed the following config in nginx.conf location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { expires 60d; }

          – Andy
          Feb 5 '12 at 2:19













          and restarted the server. still it shows me the Thu, 19 Nov 1981 08:52:00 GMT for the expires value. please help.

          – Andy
          Feb 5 '12 at 2:20





          and restarted the server. still it shows me the Thu, 19 Nov 1981 08:52:00 GMT for the expires value. please help.

          – Andy
          Feb 5 '12 at 2:20













          You may want to add the following just after/before expires directive that sets the max-age to 10hours... add_header Cache-Control "max-age=86400, public, must-revalidate"

          – Pothi Kalimuthu
          Feb 5 '12 at 4:12







          You may want to add the following just after/before expires directive that sets the max-age to 10hours... add_header Cache-Control "max-age=86400, public, must-revalidate"

          – Pothi Kalimuthu
          Feb 5 '12 at 4:12




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f356927%2fexpires-directive-returned-in-the-ngix-server-response-header%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Фонтен-ла-Гаярд Зміст Демографія | Економіка | Посилання |...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Маріан Котлеба Зміст Життєпис | Політичні погляди |...