Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server{
- listen 80;
- # server_name ajaxdemo.in.ua;
- # proxy_set_header Host ajaxdemo.in.ua;
- location / {
- return 301 https://ajaxdemo.in.ua$request_uri;
- }
- }
- server {
- # listen 80;
- listen 443 default ssl;
- #ssl on;
- ssl_certificate /etc/nginx/ssl/server.crt;
- ssl_certificate_key /etc/nginx/ssl/server.key;
- # proxy_redirect off;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- #proxy_set_header X-Forwarded-Proto http;
- location / {
- root /data/www;
- add_header 'Access-Control-Allow-Origin' *;
- add_header 'Access-Control-Allow-Credentials' 'true';
- add_header 'Access-Control-Allow-Methods' 'GET';
- if ($http_cookie ~* "jsessionid=([^;]+)(?:;|$)") {
- set $co "jsessionid=$1";
- }
- #proxy_set_header Cookie "$co";
- proxy_pass http://127.0.0.1:1666/SecurConfig/;
- #proxy_pass http://88.81.229.142:1666/SecurConfig/;
- add_before_body /header.html;
- add_after_body /footer.html;
- }
- location /SecurConfig/api/tutorial/listen {
- add_header 'Access-Control-Allow-Origin' *;
- add_header 'Access-Control-Allow-Credentials' 'true';
- add_header 'Access-Control-Allow-Methods' 'GET';
- ##Server sent events set
- proxy_set_header Connection '';
- proxy_http_version 1.1;
- chunked_transfer_encoding off;
- proxy_connect_timeout 50;
- proxy_send_timeout 50;
- proxy_read_timeout 50;
- proxy_buffering on;
- proxy_buffer_size 8k;
- #proxy_cache off;
- ##
- if ($http_cookie ~* "jsessionid=([^;]+)(?:;|$)") {
- set $co "jsessionid=$1";
- }
- #proxy_set_header Cookie "$co";
- proxy_pass http://127.0.0.1:1666/;
- #proxy_pass http://88.81.229.142:1666/;
- }
- location /SecurConfig/ {
- root /data/www;
- add_header 'Access-Control-Allow-Origin' *;
- add_header 'Access-Control-Allow-Credentials' 'true';
- add_header 'Access-Control-Allow-Methods' 'GET';
- if ($http_cookie ~* "jsessionid=([^;]+)(?:;|$)") {
- set $co "jsessionid=$1";
- }
- #proxy_set_header Cookie "$co";
- proxy_pass http://127.0.0.1:1666/;
- #proxy_pass http://88.81.229.142:1666/;
- add_before_body /header.html;
- add_after_body /footer.html;
- }
- location ~ \.css$ {
- root /data/css/;
- }
- location /header.html {
- root /data/www;
- }
- location /footer.html {
- root /data/www;
- }
- location ~ \.(gif|jpg|png|jpeg)$ {
- root /data/images;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement