Guest User

Untitled

a guest
Oct 18th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. user httpdusr everyone;
  2. #####################
  3. worker_processes 1;
  4.  
  5. events {
  6. worker_connections 1024;
  7. }
  8.  
  9. http {
  10. server {
  11. listen 80;
  12. include /opt/etc/nginx/mime.types;
  13.  
  14. location / {
  15. try_files $uri$args $uri$args/ index.html;
  16. root /share/CE_CACHEDEV1_DATA/Web/fitness/;
  17. }
  18.  
  19. auth_basic "Restricted";
  20. auth_basic_user_file /share/Web/.htpasswd
  21. }
  22.  
  23. server {
  24. listen 80;
  25. server_name service1.domain.com;
  26.  
  27. location / {
  28. proxy_pass http://localhost:9091;
  29. }
  30. }
  31.  
  32. server {
  33. listen 80;
  34. server_name service2.domain.com;
  35.  
  36. location / {
  37. proxy_pass http://localhost:8080;
  38. }
  39. }
  40.  
  41. server {
  42. listen 80;
  43. server_name service3.domain.com;
  44.  
  45. location / {
  46. proxy_pass http://192.168.1.1;
  47. }
  48. proxy_set_header Host $host;
  49. }
  50.  
  51. server {
  52. listen 80;
  53. server_name service4.domain.com;
  54.  
  55. location / {
  56. proxy_pass http://localhost:32400;
  57. }
  58. }
  59.  
  60. server {
  61. listen 80;
  62. server_name service5.domain.com;
  63.  
  64. location / {
  65. proxy_pass http://localhost:5601;
  66. }
  67.  
  68. auth_basic "Restricted";
  69. auth_basic_user_file /share/Web/.htpasswd;
  70. }
  71.  
  72. }
  73.  
  74. common() {
  75. listen 80;
  76. server_name <param1>;
  77.  
  78. location / {
  79. proxy_pass <param2>;
  80. }
  81. }
  82.  
  83. common(service1.domain.com, http://localhost:9091)
Add Comment
Please, Sign In to add comment