Advertisement
akhfa

template nginx

May 25th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. server {
  2. listen 80;
  3.  
  4. # ganti /var/www/html menjadi /var/www/nama-website.xxx/public_html
  5. root /var/www/html;
  6. index index.php index.html index.htm;
  7.  
  8. # ganti nama-server.xxx menjadi domain dari website
  9. # www bertujuan agar dapat diakses dengan url http://www.nama-server.xxx
  10. server_name www.nama-server.xxx nama-server.xxx;
  11.  
  12. location / {
  13. try_files $uri $uri/ =404;
  14. }
  15. location ~ .php$ {
  16. try_files $uri =404;
  17. fastcgi_pass unix:/var/run/php5-fpm.sock;
  18. fastcgi_index index.php;
  19. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  20. include fastcgi_params;
  21. fastcgi_buffer_size 128k;
  22. fastcgi_buffers 256 4k;
  23. fastcgi_busy_buffers_size 256k;
  24. fastcgi_temp_file_write_size 256k;
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement