nginx.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. server {
  2. # listen 80; # default_server;
  3. # listen [::]:80 default_server;
  4. # server_name _;
  5. server_name code.algometic.com books.algometic.com ocd.algometic.com metrics.algometic.com 58985620.algometic.com;
  6. # location / {
  7. # proxy_pass http://192.168.1.124:443;
  8. # }
  9. return 301 https://$host$request_uri;
  10. }
  11. server {
  12. listen 80 default_server;
  13. server_name algometic.com www.algometic.com;
  14. access_log /var/log/nginx/algometic.access.log main;
  15. root /var/www/html/algometic;
  16. index index.php index.html index.htm;
  17. client_max_body_size 64M;
  18. # client_max_body_size 0;
  19. location / {
  20. try_files $uri $uri/ /index.php?$args;
  21. }
  22. location ~ \.php$ {
  23. try_files $uri =404;
  24. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  25. fastcgi_pass php:9000;
  26. fastcgi_index index.php;
  27. include fastcgi_params;
  28. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  29. fastcgi_param PATH_INFO $fastcgi_path_info;
  30. }
  31. location /img/ {
  32. autoindex on;
  33. }
  34. }