I
I
IvanN7772016-03-15 12:09:03
Nginx
IvanN777, 2016-03-15 12:09:03

Nginx (the site opens by ip does not open by domain name), how is this possible?

46.101.153.238 opens like this.
But there is no autostudy.sk .
Here is the nginx code

upstream puma {
  server unix:///home/deploy/apps/autostudy_project/shared/tmp/sockets/autostudy_project-puma.sock;
}

server {
  listen 80;
  server_name autostudy.sk www.autostudy.sk;

  root /home/deploy/apps/autostudy_project/current/public;
  access_log /home/deploy/apps/autostudy_project/current/log/nginx.access.log;
  error_log /home/deploy/apps/autostudy_project/current/log/nginx.error.log info;

  location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;
  }

  try_files $uri/index.html $uri @puma;
  location @puma {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    proxy_pass http://puma;
  }

  error_page 500 502 503 504 /500.html;
  client_max_body_size 10M;
  keepalive_timeout 10;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
coderlex, 2016-03-16
@coderlex

Both options are open.

I
IvanN777, 2016-03-16
@IvanN777

Yes, I apparently cached it, although I checked it on two browsers.
The client also says that everything is ok.
And how is it possible that on 2 browsers?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question