Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. user nginx;
  2. worker_processes auto;
  3. error_log /var/log/nginx/error.log;
  4. pid /run/nginx.pid;
  5. worker_rlimit_nofile 20000;
  6.  
  7. # Load dynamic modules. See /usr/share/nginx/README.dynamic.
  8. include /usr/share/nginx/modules/*.conf;
  9.  
  10. events {
  11. worker_connections 1024;
  12. }
  13.  
  14. http {
  15. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  16. '$status $body_bytes_sent "$http_referer" '
  17. '"$http_user_agent" "$http_x_forwarded_for"';
  18.  
  19. access_log /var/log/nginx/access.log main;
  20.  
  21. sendfile on;
  22. tcp_nopush on;
  23. tcp_nodelay on;
  24. keepalive_timeout 65;
  25. types_hash_max_size 2048;
  26.  
  27. include /etc/nginx/mime.types;
  28. default_type application/octet-stream;
  29.  
  30. # Load modular configuration files from the /etc/nginx/conf.d directory.
  31. # See http://nginx.org/en/docs/ngx_core_module.html#include
  32. # for more information.
  33. include /etc/nginx/conf.d/*.conf;
  34.  
  35. server {
  36. listen 80;
  37. server_name 127.0.0.1;
  38. root /usr/share/nginx/modx;
  39. index index.php;
  40. client_max_body_size 30M;
  41. location / {
  42. root /usr/share/nginx/modx;
  43. if (!-e $request_filename) {
  44. rewrite ^/(.*)$ /index.php?q=$1 last;
  45. }
  46. }
  47. location ~ \.php$ {
  48. try_files $uri =404;
  49. fastcgi_split_path_info ^(.+\.php)(.*)$;
  50. fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  51. fastcgi_index index.php;
  52. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  53. include fastcgi_params;
  54. fastcgi_ignore_client_abort on;
  55. fastcgi_param SERVER_NAME $http_host;
  56. }
  57.  
  58. location ~ /\.ht {
  59. deny all;
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement