nginx.conf 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. user root;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. #pid logs/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. # '$status $body_bytes_sent "$http_referer" '
  15. # '"$http_user_agent" "$http_x_forwarded_for"';
  16. #access_log logs/access.log main;
  17. sendfile on;
  18. #tcp_nopush on;
  19. #keepalive_timeout 0;
  20. keepalive_timeout 65;
  21. #gzip on;
  22. server {
  23. listen 9090;
  24. server_name localhost;
  25. #charset koi8-r;
  26. #access_log logs/host.access.log main;
  27. location / {
  28. root /home/fangyi/projects/idea_pecw_app/dist;
  29. index index.html index.htm;
  30. }
  31. location /panasonicserver/ {
  32. proxy_set_header Host $http_host;
  33. proxy_set_header X-Real-IP $remote_addr;
  34. proxy_set_header REMOTE-HOST $remote_addr;
  35. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  36. proxy_pass http://10.199.130.70:9008/;
  37. add_header X-Frame-Options SAMEORIGIN always;
  38. add_header Strict-Transport-Security max-age=31536000;
  39. add_header Content-Security-Policy "default-src 'self';";
  40. }
  41. #error_page 404 /404.html;
  42. # redirect server error pages to the static page /50x.html
  43. #
  44. error_page 500 502 503 504 /50x.html;
  45. location = /50x.html {
  46. root html;
  47. }
  48. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  49. #
  50. #location ~ \.php$ {
  51. # proxy_pass http://127.0.0.1;
  52. #}
  53. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  54. #
  55. #location ~ \.php$ {
  56. # root html;
  57. # fastcgi_pass 127.0.0.1:9000;
  58. # fastcgi_index index.php;
  59. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  60. # include fastcgi_params;
  61. #}
  62. # deny access to .htaccess files, if Apache's document root
  63. # concurs with nginx's one
  64. #
  65. #location ~ /\.ht {
  66. # deny all;
  67. #}
  68. }
  69. # another virtual host using mix of IP-, name-, and port-based configuration
  70. #
  71. #server {
  72. # listen 8000;
  73. # listen somename:8080;
  74. # server_name somename alias another.alias;
  75. # location / {
  76. # root html;
  77. # index index.html index.htm;
  78. # }
  79. #}
  80. # HTTPS server
  81. #
  82. #server {
  83. # listen 443 ssl;
  84. # server_name localhost;
  85. # ssl_certificate cert.pem;
  86. # ssl_certificate_key cert.key;
  87. # ssl_session_cache shared:SSL:1m;
  88. # ssl_session_timeout 5m;
  89. # ssl_ciphers HIGH:!aNULL:!MD5;
  90. # ssl_prefer_server_ciphers on;
  91. # location / {
  92. # root html;
  93. # index index.html index.htm;
  94. # }
  95. #}
  96. }