Advertisement
niammuddin

nginx config untuk VE AGCi

Jul 31st, 2014
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. server {
  2. listen 80;
  3. root /usr/share/nginx/html/domain.com/public_html/public;
  4. index index.php index.html index.htm;
  5. server_name www.domain.com domain.com;
  6.  
  7. if ($host ~* ^www\.(.*))
  8. {
  9. set $host_without_www $1;
  10. rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
  11. }
  12.  
  13. location / {
  14. try_files $uri $uri/ /index.php?q=$uri&$args;
  15. }
  16.  
  17. location ~ \.php$ {
  18. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  19. fastcgi_pass unix:/var/run/php5-fpm.sock;
  20. fastcgi_index index.php;
  21. include fastcgi_params;
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement