Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx configuration not updating for browser

Tags:

nginx

I am trying to serve a website with nginx. I have noticed that when I make changes to my /etc/nginx/sites-available/game, run sudo service nginx restart, it is not reflected when I try to pull it up in the browser.

The browser just hangs and waits for a response and then timesout.

However, it works perfectly fine if I try to do a curl request to my site on the command line. I get the normal nginx html basic file. Why is that? Here. (and yes, I have made a soft link from sites-enabled/game to sites-available/game)

server {
  listen 80 default_server;
  listen [::]:80 default_server ipv6only=on;

  root /usr/share/nginx/html;
  index index.html index.htm;

  server_name my.site.uw.edu;

  location / {
    try_files $uri $uri/ =404;
  }

}

Also, I am using Ubuntu 14.04. I don't think this version of Linux uses SELinux, but could this be some sort of security configuration related deal? I have had trouble in the past with SELinux when deploying on CentOS machines.

like image 252
Jeremy Avatar asked Oct 28 '25 09:10

Jeremy


1 Answers

You can disable adding or modifying of “Expires” and “Cache-Control” response header using expires param:

expires off;

nginx docs

like image 90
Valery Viktorovsky Avatar answered Oct 31 '25 01:10

Valery Viktorovsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!