selimppc

MAC - NGINX

Jul 29th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.19 KB | None | 0 0
  1. SR-Mac:~ SelimReza$ cat /usr/local/etc/nginx/nginx.conf
  2. #user  nobody;
  3. worker_processes 1;
  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. events {
  12.     worker_connections  1024;
  13. }
  14.  
  15.  
  16. http {
  17.     include       mime.types;
  18.     default_type  application/octet-stream;
  19.  
  20.     #access_log  logs/access.log  main;
  21.     access_log /usr/local/var/log/nginx/access.log;
  22.     error_log /usr/local/var/log/nginx/error.log;
  23.  
  24.     sendfile        on;
  25.     #tcp_nopush     on;
  26.  
  27.     keepalive_timeout  65;
  28.  
  29.     gzip  on;
  30.  
  31.     server {
  32.         listen       8080;
  33.         server_name  localhost;
  34.  
  35.     autoindex on;
  36.     root   /Users/sr/Sites;
  37.  
  38.     index index.php  index.html index.htm;
  39.  
  40.         location / {
  41.         try_files $uri $uri/ /index.php?$args ;
  42.         }
  43.  
  44.  
  45.         location ~ \.php$ {
  46.  
  47.         try_files      $uri = 404;
  48.         fastcgi_pass   127.0.0.1:9000;
  49.         fastcgi_index  index.php;
  50.         fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
  51.         include        fastcgi_params;
  52.  
  53.         }
  54.  
  55.         location ~ /\.ht {
  56.             deny  all;
  57.         }
  58.     }
  59.  
  60.  
  61.     include servers/*;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment