Guest User

Untitled

a guest
Feb 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server;
  4.  
  5. # SSL configuration
  6. #
  7. # listen 443 ssl default_server;
  8. # listen [::]:443 ssl default_server;
  9. #
  10. # Self signed certs generated by the ssl-cert package
  11. # Don't use them in a production server!
  12. #
  13. # include snippets/snakeoil.conf;
  14.  
  15. root /var/www/html/johndoe;
  16. autoindex on;
  17. # Add index.php to the list if you are using PHP
  18. # Don't use them in a production server!
  19. index index.php;
  20. server_name johdoe.id;
  21.  
  22. location / {
  23. # First attempt to serve request as file, then
  24. # as directory, then fall back to displaying a 404.
  25. #try_files $uri $uri/ =404;
  26. try_files $uri $uri/ /index.php;
  27. }
  28. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  29. #
  30.  
  31. location ^~ /subproject/ {
  32. root /var/www/html/johndoe/subproject;
  33. index index.php;
  34. }
  35.  
  36. location ~ \.php$ {
  37. # include snippets/fastcgi-php.conf;
  38. #
  39. # # With php5-cgi alone:
  40. # fastcgi_pass 127.0.0.1:9000;
  41. # # With php5-fpm:
  42. # fastcgi_pass unix:/var/run/php5-fpm.sock;
  43. try_files $uri =404;
  44. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  45. include fastcgi_params;
  46. fastcgi_pass unix:/var/run/php5-fpm.sock;
  47. fastcgi_index index.php;
  48. }
  49.  
  50. # deny access to .htaccess files, if Apache's document root
  51. # concurs with nginx's one
  52. #
  53. location ~ /\.ht {
  54. deny all;
  55. }
  56. }
Add Comment
Please, Sign In to add comment