Advertisement
Tores

Untitled

Jun 28th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. upstream nodejs {
  2. server comp:30003; # comp - локальный IP компа где запущен nodejs проект, прописан в /etc/hosts машины с nginx
  3. ip_hash;
  4. }
  5.  
  6. server {
  7. listen 443 ssl;
  8. server_name oais.loc; # oais.loc - это ip машины где крутиться nginx
  9.  
  10. ssl_certificate /etc/nginx/ssl/wildcard.oais.loc.crt;
  11. ssl_certificate_key /etc/nginx/ssl/wildcard.oais.loc.key;
  12. location /node {
  13. proxy_set_header X-Forwarded-Host $host;
  14. proxy_set_header X-Forwarded-Server $host;
  15. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  16. proxy_set_header Host $http_host;
  17. proxy_pass https://nodejs;
  18.  
  19. }
  20. }
  21.  
  22. Из браузера идем по https://oais.loc/node
  23. отдается index.html а вот все скрипты пытается тянуть из https://oais.loc/scripts/js
  24. что надо допилить в nginx.conf чтобы скрипты тянулись из https://oais.loc/node/scripts/js
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement