Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/
user  nginx;
worker_processes  1;
error_log  /var/log/nginx16/error.log;
#error_log  /opt/rh/nginx16/root/var/log/nginx/error.log  notice;
#error_log  /opt/rh/nginx16/root/var/log/nginx/error.log  info;
pid        /opt/rh/nginx16/root/var/run/nginx/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /opt/rh/nginx16/root/etc/nginx/mime.types;
    default_type  application/octet-stream;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /var/log/nginx16/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
    
    #image cache
    proxy_cache_path /tmp/nginx levels=1:2 keys_zone=imgcache:10m inactive=60m;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /opt/rh/nginx16/root/etc/nginx/conf.d/*.conf; 
    server {
        listen       8080;
        server_name  localhost;
        location / {
            root   /opt/rh/nginx16/root/usr/share/nginx/html;
            index  index.html index.htm;
        }
        error_page  404              /404.html;
        location = /40x.html {
            root   /opt/rh/nginx16/root/usr/share/nginx/html;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   # glast-ground.conf, srs.conf, lsst-camera.conf, etc...
    include /opt/rh/nginx16/root/usr/shareetc/nginx/html;
        }
        
        location /Pipeline-II {
            proxy_pass              http://glast-tomcat09.slac.stanford.edu:8080;
            proxy_set_header        X-Real-IP $remote_addr;
            proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header        Host $http_host;
        }
    }
    proxy_cache_path /tmp/nginx levels=1:2 keys_zone=imgcache:10m inactive=60m;conf.d/*.conf;

    server {
        listen       8180;
        server_name  localhost;
        location / {
            proxy_pass              http://scalnx-v01.slac.stanford.edu:8180;
            proxy_cache             imgcache;
            proxy_set_header        X-Real-IP $remote_addr;
            proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header        Host $http_host;
        }
    }
}

...