Skip to content

Instantly share code, notes, and snippets.

@alex-samborskiy
Last active March 13, 2019 10:04
Show Gist options
  • Select an option

  • Save alex-samborskiy/c2450a1087e09a7ae289d3cad1d3e388 to your computer and use it in GitHub Desktop.

Select an option

Save alex-samborskiy/c2450a1087e09a7ae289d3cad1d3e388 to your computer and use it in GitHub Desktop.
PureConnect CIC Web Applications config for nginx
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
set $ininIcwsOriginalUrl $http_inin_icws_original_url;
if ($ininIcwsOriginalUrl !~ .+) {
set $ininIcwsOriginalUrl $scheme://$http_host$request_uri;
}
location ~* (?:^(.+)/api|^/api)/([^/]+)(/.+)$ {
set $web_app $1;
set $server $2;
set $icws_path $3;
proxy_cookie_path /icws/ $web_app/api/$server/icws/;
proxy_redirect /icws/ $web_app/api/$server/icws/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header ININ-ICWS-Original-URL $ininIcwsOriginalUrl;
proxy_pass http://$server:8018$icws_path$is_args$args;
#add_header P3P ‘CP = “CAO PSA OUR”';
# If you are securing the ICWS host(s), use this rewrite
# rule instead :
# proxy_passhttps://$server:8019$icws_path$is_args$args;
proxy_buffering off;
proxy_http_version 1.1;
}
# pass PHP scripts to FastCGI server
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment