henrikx

Untitled

Sep 28th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. #user nobody;
  2. worker_processes 1;
  3.  
  4. #error_log logs/error.log;
  5. #error_log logs/error.log notice;
  6. #error_log logs/error.log info;
  7.  
  8. #pid logs/nginx.pid;
  9.  
  10.  
  11. events {
  12. worker_connections 1024;
  13. }
  14. http {
  15. include /usr/local/nginx/conf/mime.types;
  16. index index.html index.htm index.php;
  17.  
  18. default_type application/octet-stream;
  19. log_format main '$remote_addr - $remote_user [$time_local] $status '
  20. '"$request" $body_bytes_sent "$http_referer" '
  21. '"$http_user_agent" "$http_x_forwarded_for"';
  22. access_log logs/access.log main;
  23. sendfile on;
  24. tcp_nopush on;
  25. server_names_hash_bucket_size 128; # this seems to be required for some vhosts
  26.  
  27. server {
  28. listen 91.134.231.xx:80;
  29. server_name webmin.norxxxxx.com;
  30.  
  31. access_log /var/log/nginx/access.log main;
  32. error_log /var/log/nginx/error.log ;
  33. root /usr/share/nginx/html;
  34. index index.html index.htm;
  35.  
  36. ## send request back to apache1 ##
  37. location / {
  38. proxy_pass http://[2a06:e881:xxxx:xxx::1337];
  39. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
  40. proxy_redirect off;
  41. proxy_buffering off;
  42. proxy_set_header Host $host;
  43. proxy_set_header X-Real-IP $remote_addr;
  44. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  45. }
  46. }
  47. ## HTTPS
  48.  
  49. server {
  50. listen 91.134.231.xx:443;
  51. server_name webmin.norxxxxx.com;
  52.  
  53. access_log /var/log/nginx/access.log main;
  54. error_log /var/log/nginx/error.log ;
  55. root /usr/share/nginx/html;
  56. index index.html index.htm;
  57. ssl on;
  58. ssl_certificate /etc/webmin/miniserv.cert;
  59. ssl_certificate_key /etc/webmin/miniserv.pem;
  60. ## send request back to apache1 ##
  61. location / {
  62. proxy_pass https://[2a06:e881:xxxx:xxx::1337];
  63. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
  64. proxy_redirect off;
  65. proxy_buffering off;
  66. proxy_set_header Host $host;
  67. proxy_set_header X-Real-IP $remote_addr;
  68. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  69. }}
  70. server {
  71. listen 91.134.231.xx:443;
  72. server_name norxxxxx.com;
  73.  
  74. access_log /var/log/nginx/access.log main;
  75. error_log /var/log/nginx/error.log ;
  76. root /usr/share/nginx/html;
  77. index index.html index.htm;
  78. ssl on;
  79. ssl_certificate /etc/webmin/miniserv.cert;
  80. ssl_certificate_key /etc/webmin/miniserv.pem;
  81. location / {
  82. proxy_pass https://[2a06:e881:xxxx:xxx::8];
  83. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
  84. proxy_redirect off;
  85. proxy_buffering off;
  86. proxy_set_header Host $host;
  87. proxy_set_header X-Real-IP $remote_addr;
  88. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  89. }
  90. }
  91. ##
  92. }
  93. #RTMP
  94. rtmp {
  95. server {
  96. listen 1935;
  97. chunk_size 4096;
  98.  
  99. application live {
  100. live on;
  101. record off;
  102. }
  103. }
  104. }
Add Comment
Please, Sign In to add comment