Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. server {
  2. # Replace this port with the right one for your requirements
  3. listen 80; #could also be 1.2.3.4:80
  4.  
  5. # Multiple hostnames separated by spaces. Replace these as well.
  6. server_name admin.black.local; # Alternately: _
  7.  
  8. root /home/cawa/www/secretcloset_black/admin-black/web;
  9.  
  10. #error_page 404 errors/404.html;
  11.  
  12. # error_log /home/cawa/www/secretcloset_black/admin-black/nginx_dev.log error;
  13.  
  14. index app_dev.php;
  15.  
  16.  
  17.  
  18.  
  19. # unless the request is for a valid file (image, js, css, etc.), send to bootstrap
  20. if (!-e $request_filename)
  21. {
  22. rewrite ^/(.*)$ /app_dev.php?/$1 last;
  23. break;
  24. }
  25.  
  26. location / {
  27. try_files $uri $uri/ /app_dev.php?$query_string;
  28. }
  29.  
  30. location ~* \.php$ {
  31. try_files $uri = 404;
  32. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  33. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; #unix:/var/run/php5-fpm.sock; # /var/run/php/php7.0-fpm.sock
  34. fastcgi_index app_dev.php;
  35. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  36. include fastcgi_params;
  37. }
  38.  
  39. location ~* ^(.+)@2x.(jpg|jpeg|gif|png)$ {
  40. try_files $uri $1.$2 =404;
  41. }
  42.  
  43.  
  44. #include common/php;
  45.  
  46. location ~ /\.ht {
  47. deny all;
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement