summaryrefslogtreecommitdiff
path: root/usr/local/etc/nginx/nginx.conf
blob: efef87bc7782c3cc735e623ebeff2d5faac31ad5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
worker_processes 1;

events {
  worker_connections 1024;
}

http {
  include mime.types;
  default_type application_octet-stream;

  sendfile on;

  server {
    server_name theglassyladies.com;
    listen 80;
    rewrite ^/admin$ https://theglassyladies.com redirect;
    rewrite ^/care$ https://theglassyladies.com redirect;
    rewrite ^/faq$ https://theglassyladies.com redirect;
    rewrite ^/privacy$ https://theglassyladies.com redirect;
    rewrite ^/cart$ https://theglassyladies.com redirect;
    rewrite ^/checkout$ https://theglassyladies.com redirect;
    client_max_body_size 10M;
    gzip on;
    gzip_vary on;
    #gzip_min_length 10240;
    gzip_proxied expired no-cache no-store private auth;
    gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
    gzip_disable "MSIE [1-6]\.";
    sendfile on;
    sendfile_max_chunk 1m;
    keepalive_timeout 65;
  
    location / {
      root /var/www;
      index index.html;
      try_files $uri $uri/ /index.html;
    }
  
    location /login {
      auth_basic "Glassy Ladies only!";
      auth_basic_user_file /var/db/theglassyladies/.htpasswd;
    }
  
    location /images/ {
      root /var/db/gl/images;
      autoindex on;
    }
  
    location /api/ {
      proxy_pass http://localhost:9876/;
  
      limit_except GET OPTIONS {
        auth_basic "Glassy Ladies only!";
        auth_basic_user_file /var/db/theglassyladies/.htpasswd;
      }
    }
  
  }
  
}