You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.0 KiB

  1. # EasyEngine admin NGINX CONFIGURATION
  2. server {
  3. listen 22222 default_server ssl http2;
  4. access_log off;
  5. error_log /var/log/nginx/22222.error.log;
  6. ssl_certificate /var/www/22222/cert/22222.crt;
  7. ssl_certificate_key /var/www/22222/cert/22222.key;
  8. # Force HTTP to HTTPS
  9. error_page 497 =200 https://$host:22222$request_uri;
  10. root /var/www/22222/htdocs;
  11. index index.php index.htm index.html;
  12. # Turn on directory listing
  13. autoindex on;
  14. # HTTP Authentication on port 22222
  15. include common/acl.conf;
  16. location / {
  17. try_files $uri $uri/ /index.php?$args;
  18. }
  19. # nginx-vts-status
  20. location /vts_status {
  21. vhost_traffic_status_display;
  22. vhost_traffic_status_display_format html;
  23. }
  24. # Display menu at location /fpm/status/
  25. location = /fpm/status/ {}
  26. location ~ /fpm/status/(.*) {
  27. try_files $uri =404;
  28. include fastcgi_params;
  29. fastcgi_param SCRIPT_NAME /status;
  30. fastcgi_pass $1;
  31. }
  32. location ~ \.php$ {
  33. try_files $uri =404;
  34. include fastcgi_params;
  35. fastcgi_pass php72;
  36. }
  37. # ViMbAdmin Rules
  38. location = /vimbadmin/ {
  39. return 301 $scheme://$host:22222/vimbadmin/public/;
  40. }
  41. location ~* /vimbadmin/public/(.*)/(.*) {
  42. root /var/www/22222/htdocs/vimbadmin/public;
  43. try_files $uri $uri/ /vimbadmin/public/index.php?$args;
  44. }
  45. location ~* /vimbadmin/public/(.*) {
  46. root /var/www/22222/htdocs/vimbadmin/public;
  47. try_files $uri $uri/ /vimbadmin/public/index.php?$args;
  48. }
  49. location /netdata {
  50. return 301 /netdata/;
  51. }
  52. location ~ /netdata/(?<ndpath>.*) {
  53. proxy_redirect off;
  54. proxy_set_header Host $host;
  55. proxy_set_header X-Forwarded-Host $host;
  56. proxy_set_header X-Forwarded-Server $host;
  57. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  58. proxy_http_version 1.1;
  59. proxy_pass_request_headers on;
  60. proxy_set_header Connection "keep-alive";
  61. proxy_store off;
  62. proxy_pass http://netdata/$ndpath$is_args$args;
  63. gzip on;
  64. gzip_proxied any;
  65. gzip_types *;
  66. }
  67. }