Last active
December 21, 2023 12:58
-
-
Save osharim/8263714 to your computer and use it in GitHub Desktop.
Revisions
-
osharim revised this gist
Jul 24, 2019 . No changes.There are no files selected for viewing
-
osharim revised this gist
Jun 18, 2019 . No changes.There are no files selected for viewing
-
osharim renamed this gist
Jun 18, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
osharim revised this gist
Sep 14, 2017 . No changes.There are no files selected for viewing
-
Omarhernandez renamed this gist
Jan 5, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Omarhernandez created this gist
Jan 5, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ #Django Config server { server_name domain.com; access_log on; location / { proxy_pass http://127.0.0.1:8001; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr; add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"'; } } #Nodejs Config server{ server_name subdomain.domain.com; access_log /var/log/nginx/me.log; location / { proxy_pass http://127.0.0.1:8002; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; #IMPORTANT #Must allow access to this origin resource http://subdomain.domain.com; #if is not set , you will get CORS message and the websockets will be blocked proxy_set_header Access-Control-Allow-Origin http://subdomain.domain.com; proxy_set_header 'Access-Control-Allow-Headers' 'X-Requested-With,Accept,Content-Type, Origin'; proxy_set_header X-NginX-Proxy true; proxy_redirect off; } }