gopkg.in/openshift/source-to-image.v1@v1.2.0/examples/nginx-centos7/test/test-app-redirect/nginx.conf (about)

     1  # For more information on configuration, see:
     2  #   * Official English Documentation: http://nginx.org/en/docs/
     3  #   * Official Russian Documentation: http://nginx.org/ru/docs/
     4  
     5  worker_processes auto;
     6  error_log /var/log/nginx/error.log;
     7  pid /run/nginx.pid;
     8  
     9  # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
    10  include /usr/share/nginx/modules/*.conf;
    11  
    12  events {
    13      worker_connections 1024;
    14  }
    15  
    16  http {
    17      log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    18                        '$status $body_bytes_sent "$http_referer" '
    19                        '"$http_user_agent" "$http_x_forwarded_for"';
    20  
    21      access_log  /var/log/nginx/access.log  main;
    22  
    23      sendfile            on;
    24      tcp_nopush          on;
    25      tcp_nodelay         on;
    26      keepalive_timeout   65;
    27      types_hash_max_size 2048;
    28  
    29      include             /etc/nginx/mime.types;
    30      default_type        application/octet-stream;
    31  
    32      # Load modular configuration files from the /etc/nginx/conf.d directory.
    33      # See http://nginx.org/en/docs/ngx_core_module.html#include
    34      # for more information.
    35      include /etc/nginx/conf.d/*.conf;
    36  
    37      server {
    38          listen       8080 default_server;
    39          listen       [::]:8080 default_server;
    40          server_name  _;
    41          root         /usr/share/nginx/html;
    42  
    43          # Load configuration files for the default server block.
    44          include /etc/nginx/default.d/*.conf;
    45  
    46          location / {
    47              return 301 http://openshift.com;
    48          }
    49  
    50          error_page 404 /404.html;
    51              location = /40x.html {
    52          }
    53  
    54          error_page 500 502 503 504 /50x.html;
    55              location = /50x.html {
    56          }
    57      }
    58  }
    59