Advertisement
fabiotnt

Laravel 4 nginx configuration

Oct 17th, 2013
1,188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. # Laravel 4 nginx configuration
  2. server {
  3.  
  4. server_name www.yourdomain.com;
  5.  
  6. access_log /var/www/yourdomain.com/log/access.log;
  7. error_log /var/www/yourdomain.com/log/error.log;
  8.  
  9. root /var/www/yourdomain.com/public;
  10. index index.php index.html index.htm;
  11.  
  12. location / {
  13. try_files $uri $uri/ /index.php?$args;
  14. }
  15.  
  16. location ~ \.php$ {
  17.  
  18. # With php5-fpm:
  19. include /opt/nginx/conf/fastcgi_params; #Here you need to point your nginx instalation directory
  20. fastcgi_pass unix:/var/run/php5-fpm.sock; #Use this config if you are using sock or use fastcgi_pass 127.0.0.1:9000;
  21. fastcgi_index index.php;
  22. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  23.  
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement