Advertisement
Guest User

Untitled

a guest
Jan 8th, 2021
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.54 KB | None | 0 0
  1. user simon;
  2. worker_processes  1;
  3. worker_cpu_affinity auto;
  4.  
  5. # error_log  logs/error.log;
  6. # error_log  logs/error.log  notice;
  7. error_log  logs/error.log  info;
  8.  
  9. #pid        logs/nginx.pid;
  10.  
  11.  
  12. events {
  13.     worker_connections  1024;
  14. }
  15.  
  16.  
  17. http {
  18.     include       mime.types;
  19.     default_type  application/octet-stream;
  20.     types_hash_max_size 4096;
  21.     server_names_hash_bucket_size 128;
  22.     ## Load virtual host conf files
  23.     include /etc/nginx/sites-enabled/*;
  24.  
  25.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  26.     #                  '$status $body_bytes_sent "$http_referer" '
  27.     #                  '"$http_user_agent" "$http_x_forwarded_for"';
  28.  
  29.     #access_log  logs/access.log  main;
  30.  
  31.     sendfile        on;
  32.     #tcp_nopush     on;
  33.  
  34.     #keepalive_timeout  0;
  35.     keepalive_timeout  65;
  36.  
  37.     #gzip  on;
  38.  
  39.     server {
  40.         listen          80;
  41.         server_name     backend.loc;
  42.  
  43.         #charset koi8-r;
  44.  
  45.         #access_log  logs/host.access.log  main;
  46.  
  47.         location / {
  48.         root    /home/simon/PhpstormProjects/untitled;
  49.         index   index.php;
  50.         }
  51.  
  52.     # location /files {
  53.     #   root /home/simon/projects/backend-project;
  54.     # }
  55.  
  56.     location ~ \.php$ {
  57.         # 404
  58.         try_files $fastcgi_script_name =404;
  59.  
  60.         # default fastcgi_params
  61.         include fastcgi_params;
  62.  
  63.         fastcgi_pass        unix:/run/php-fpm/php-fpm.sock;
  64.         fastcgi_index       index.php;
  65.         fastcgi_buffers     8 16k;
  66.         fastcgi_buffer_size 32k;
  67.  
  68.         # fastcgi_params
  69.         fastcgi_param DOCUMENT_ROOT $realpath_root;
  70.         fastcgi_param SCRIPT_FILENAME   $realpath_root$fastcgi_script_name;
  71.         #fastcgi_param PHP_ADMIN_VALUE  "open_basedir=$base/:/usr/lib/php/:/tmp/";
  72.     }
  73.  
  74.     location = /favicon.ico {
  75.         access_log off;
  76.         log_subrequest off;
  77.         log_not_found off;
  78.     }
  79.  
  80.         #error_page  404              /404.html;
  81.  
  82.         # redirect server error pages to the static page /50x.html
  83.         #
  84.         error_page   500 502 503 504  /50x.html;
  85.         location = /50x.html {
  86.             root   /usr/share/nginx/html;
  87.         }
  88.  
  89.         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  90.         #
  91.         #location ~ \.php$ {
  92.         #    proxy_pass   http://127.0.0.1;
  93.         #}
  94.  
  95.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  96.         #
  97.         #location ~ \.php$ {
  98.         #    root           html;
  99.         #    fastcgi_pass   127.0.0.1:9000;
  100.         #    fastcgi_index  index.php;
  101.         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
  102.         #    include        fastcgi_params;
  103.         #}
  104.  
  105.         # deny access to .htaccess files, if Apache's document root
  106.         # concurs with nginx's one
  107.         #
  108.         #location ~ /\.ht {
  109.         #    deny  all;
  110.         #}
  111.     }
  112.  
  113.  
  114.     # another virtual host using mix of IP-, name-, and port-based configuration
  115.     #
  116.     #server {
  117.     #    listen       8000;
  118.     #    listen       somename:8080;
  119.     #    server_name  somename  alias  another.alias;
  120.  
  121.     #    location / {
  122.     #        root   html;
  123.     #        index  index.html index.htm;
  124.     #    }
  125.     #}
  126.  
  127.  
  128.     # HTTPS server
  129.     #
  130.     #server {
  131.     #    listen       443 ssl;
  132.     #    server_name  localhost;
  133.  
  134.     #    ssl_certificate      cert.pem;
  135.     #    ssl_certificate_key  cert.key;
  136.  
  137.     #    ssl_session_cache    shared:SSL:1m;
  138.     #    ssl_session_timeout  5m;
  139.  
  140.     #    ssl_ciphers  HIGH:!aNULL:!MD5;
  141.     #    ssl_prefer_server_ciphers  on;
  142.  
  143.     #    location / {
  144.     #        root   html;
  145.     #        index  index.html index.htm;
  146.     #    }
  147.     #}
  148.  
  149. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement