nginx.conf 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. # For more information on configuration, see:
  2. # * Official English Documentation: http://nginx.org/en/docs/
  3. # * Official Russian Documentation: http://nginx.org/ru/docs/
  4. user nginx;
  5. worker_processes auto;
  6. error_log /var/log/nginx/error.log;
  7. pid /run/nginx.pid;
  8. # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
  9. include /usr/share/nginx/modules/*.conf;
  10. events {
  11. worker_connections 1024;
  12. }
  13. http {
  14. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  15. '$status $body_bytes_sent "$http_referer" '
  16. '"$http_user_agent" "$http_x_forwarded_for"';
  17. access_log /var/log/nginx/access.log main;
  18. sendfile on;
  19. tcp_nopush on;
  20. tcp_nodelay on;
  21. keepalive_timeout 65;
  22. types_hash_max_size 2048;
  23. client_max_body_size 50M;
  24. include /etc/nginx/mime.types;
  25. default_type application/octet-stream;
  26. # Load modular configuration files from the /etc/nginx/conf.d directory.
  27. # See http://nginx.org/en/docs/ngx_core_module.html#include
  28. # for more information.
  29. include /etc/nginx/conf.d/*.conf;
  30. server {
  31. server_name hichinatravel.com;
  32. rewrite ^(.*) http://www.hichinatravel.com$1 permanent;
  33. }
  34. server {
  35. listen 80 default_server;
  36. listen [::]:80 default_server;
  37. server_name _;
  38. root /usr/share/nginx/html;
  39. # Load configuration files for the default server block.
  40. include /etc/nginx/default.d/*.conf;
  41. location / {
  42. }
  43. error_page 404 /404.html;
  44. location = /40x.html {
  45. }
  46. error_page 500 502 503 504 /50x.html;
  47. location = /50x.html {
  48. }
  49. }
  50. server {
  51. listen 80;
  52. server_name www.hichinatravel.com;
  53. root /usr/share/nginx/html;
  54. # Load configuration files for the default server block.
  55. include /etc/nginx/default.d/*.conf;
  56. location / {
  57. proxy_set_header X-Real-IP $remote_addr;
  58. proxy_set_header Host hichinatravel.com;
  59. proxy_pass http://127.0.0.1:8765;
  60. }
  61. error_page 404 /404.html;
  62. location = /40x.html {
  63. }
  64. error_page 500 502 503 504 /50x.html;
  65. location = /50x.html {
  66. }
  67. }
  68. server {
  69. listen 80;
  70. server_name elastic.hichinatravel.com;
  71. root /usr/share/nginx/html;
  72. # Load configuration files for the default server block.
  73. include /etc/nginx/default.d/*.conf;
  74. location / {
  75. proxy_set_header X-Real-IP $remote_addr;
  76. proxy_set_header Host elastic.hichinatravel.com;
  77. proxy_cookie_domain elastic.hichinatravel.com $host;
  78. sub_filter "elastic.hichinatravel.com" $host;
  79. proxy_pass http://127.0.0.1:9200;
  80. }
  81. error_page 404 /404.html;
  82. location = /40x.html {
  83. }
  84. error_page 500 502 503 504 /50x.html;
  85. location = /50x.html {
  86. }
  87. }
  88. server {
  89. listen 80;
  90. server_name kibana.hichinatravel.com;
  91. root /usr/share/nginx/html;
  92. # Load configuration files for the default server block.
  93. include /etc/nginx/default.d/*.conf;
  94. location / {
  95. proxy_set_header X-Real-IP $remote_addr;
  96. proxy_set_header Host kibana.hichinatravel.com;
  97. proxy_cookie_domain kibana.hichinatravel.com $host;
  98. sub_filter "kibana.hichinatravel.com" $host;
  99. proxy_pass http://127.0.0.1:5601;
  100. }
  101. error_page 404 /404.html;
  102. location = /40x.html {
  103. }
  104. error_page 500 502 503 504 /50x.html;
  105. location = /50x.html {
  106. }
  107. }
  108. server {
  109. listen 80;
  110. server_name admin-qa.hichinatravel.com;
  111. root /usr/share/nginx/html;
  112. # Load configuration files for the default server block.
  113. include /etc/nginx/default.d/*.conf;
  114. location / {
  115. proxy_set_header X-Real-IP $remote_addr;
  116. proxy_set_header Host admin-qa.hichinatravel.com;
  117. proxy_cookie_domain admin-qa.hichinatravel.com $host;
  118. sub_filter "admin-qa.hichinatravel.com" $host;
  119. proxy_pass http://127.0.0.1:9051;
  120. }
  121. location /service {
  122. rewrite /service(.*) $1 break;
  123. proxy_pass http://127.0.0.1:9050;
  124. proxy_redirect off;
  125. proxy_set_header Host admin-qa.hichinatravel.com;
  126. proxy_set_header X-Real-IP $remote_addr;
  127. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  128. }
  129. error_page 404 /404.html;
  130. location = /40x.html {
  131. }
  132. error_page 500 502 503 504 /50x.html;
  133. location = /50x.html {
  134. }
  135. }
  136. server {
  137. listen 80;
  138. server_name qa.hichinatravel.com;
  139. root /usr/share/nginx/html;
  140. # Load configuration files for the default server block.
  141. include /etc/nginx/default.d/*.conf;
  142. location / {
  143. proxy_set_header X-Real-IP $remote_addr;
  144. proxy_set_header Host qa.hichinatravel.com;
  145. proxy_pass http://127.0.0.1:9053;
  146. }
  147. error_page 404 /404.html;
  148. location = /40x.html {
  149. }
  150. error_page 500 502 503 504 /50x.html;
  151. location = /50x.html {
  152. }
  153. }
  154. server {
  155. listen 80;
  156. server_name mayan.hichinatravel.com;
  157. root /usr/share/nginx/html;
  158. # Load configuration files for the default server block.
  159. include /etc/nginx/default.d/*.conf;
  160. location / {
  161. proxy_set_header X-Real-IP $remote_addr;
  162. proxy_set_header Host mayan.hichinatravel.com;
  163. proxy_pass http://127.0.0.1:85;
  164. }
  165. error_page 404 /404.html;
  166. location = /40x.html {
  167. }
  168. error_page 500 502 503 504 /50x.html;
  169. location = /50x.html {
  170. }
  171. }
  172. server {
  173. listen 80;
  174. server_name photoprism.hichinatravel.com;
  175. root /usr/share/nginx/html;
  176. # Load configuration files for the default server block.
  177. include /etc/nginx/default.d/*.conf;
  178. location / {
  179. proxy_set_header X-Real-IP $remote_addr;
  180. proxy_set_header Host photoprism.hichinatravel.com;
  181. proxy_pass http://127.0.0.1:2342;
  182. }
  183. error_page 404 /404.html;
  184. location = /40x.html {
  185. }
  186. error_page 500 502 503 504 /50x.html;
  187. location = /50x.html {
  188. }
  189. }
  190. server {
  191. listen 80;
  192. server_name git.hichinatravel.com;
  193. root /usr/share/nginx/html;
  194. # Load configuration files for the default server block.
  195. include /etc/nginx/default.d/*.conf;
  196. location / {
  197. proxy_set_header X-Real-IP $remote_addr;
  198. proxy_set_header Host git.hichinatravel.com;
  199. proxy_pass http://127.0.0.1:3001;
  200. }
  201. error_page 404 /404.html;
  202. location = /40x.html {
  203. }
  204. error_page 500 502 503 504 /50x.html;
  205. location = /50x.html {
  206. }
  207. }
  208. server {
  209. listen 80;
  210. server_name wiki.hichinatravel.com;
  211. root /usr/share/nginx/html;
  212. # Load configuration files for the default server block.
  213. include /etc/nginx/default.d/*.conf;
  214. location / {
  215. proxy_set_header X-Real-IP $remote_addr;
  216. proxy_set_header Host wiki.hichinatravel.com;
  217. proxy_pass http://127.0.0.1:3000;
  218. }
  219. error_page 404 /404.html;
  220. location = /40x.html {
  221. }
  222. error_page 500 502 503 504 /50x.html;
  223. location = /50x.html {
  224. }
  225. }
  226. # Settings for a TLS enabled server.
  227. #
  228. # server {
  229. # listen 443 ssl http2 default_server;
  230. # listen [::]:443 ssl http2 default_server;
  231. # server_name _;
  232. # root /usr/share/nginx/html;
  233. #
  234. # ssl_certificate "/etc/pki/nginx/server.crt";
  235. # ssl_certificate_key "/etc/pki/nginx/private/server.key";
  236. # ssl_session_cache shared:SSL:1m;
  237. # ssl_session_timeout 10m;
  238. # ssl_ciphers PROFILE=SYSTEM;
  239. # ssl_prefer_server_ciphers on;
  240. #
  241. # # Load configuration files for the default server block.
  242. # include /etc/nginx/default.d/*.conf;
  243. #
  244. # location / {
  245. # }
  246. #
  247. # error_page 404 /404.html;
  248. # location = /40x.html {
  249. # }
  250. #
  251. # error_page 500 502 503 504 /50x.html;
  252. # location = /50x.html {
  253. # }
  254. # }
  255. }