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.

56 lines
1.4 KiB

  1. worker_processes 2;
  2. error_log logs/error.log;
  3. events {
  4. worker_connections 1024;
  5. }
  6. http {
  7. include mime.types;
  8. default_type application/octet-stream;
  9. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  10. '$status $body_bytes_sent "$http_referer" '
  11. '"$http_user_agent" "$http_x_forwarded_for"';
  12. access_log logs/access.log main;
  13. sendfile on;
  14. keepalive_timeout 65;
  15. gzip on;
  16. set_real_ip_from 172.16.30.0/24;
  17. upstream fpm {
  18. server unix:/run/php-fpm/php-fpm.sock;
  19. }
  20. map $http_host $app_env {
  21. hostnames;
  22. stage.m.* mobile;
  23. m.* mobile;
  24. }
  25. server {
  26. server_name domain;
  27. listen 80;
  28. listen 443 ssl http2;
  29. ssl_certificate /etc/ssl/domain.crt;
  30. ssl_certificate_key /etc/ssl/domain.key;
  31. root /var/www/octobercms;
  32. include www.conf;
  33. include https.conf;
  34. include octobercms.conf;
  35. include staticfiles.conf;
  36. location ~ ^/backend {
  37. client_max_body_size 10M;
  38. }
  39. location ~ ^/(index|t).php {
  40. fastcgi_pass fpm;
  41. include fastcgi_params;
  42. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  43. fastcgi_read_timeout 3000;
  44. fastcgi_param APP_ENV $app_env;
  45. }
  46. }
  47. }