Friday, June 13, 2014

How to set up Nginx server & CakePHP for Web Development?

Hi everyone,

I just switched from Windows 7 XAMPP installation on Ubuntu 14.04 LEMP (Linux, NGINX, MySql, PHP5.5).

In xampp I have htdoc following folder structure:

C:\xampp\htdocs\cakephp
C:\xampp\htdocs\portal
C:\xampp\htdocs\farm.ba
C:\xampp\htdocs\detas.ba
...

where CakePHP folder serve as the source library, while other are baked projects C:\xampp\htdocs\(new app folder)

Now in Ubuntu want an identical folder structure:

/home/nix/htdocs/cakephp
/home/nix/htdocs/portal
....
/home/nix/htdocs/(new app folder)


Is it possible to set Ngnix that automatically accepts the path for a new project?
Is it possible to adjust the configuration of something like this?

server { 
  listen 80 ;

  server_name localhost;   

  root /home/nix/htdocs;
  index index.html index.php;

  location /cakephp { ...}
  location /phpmyadmin { ...}

  location /* {  // <= wildcard for any projects folder ?
    try_files $uri $uri/ /index.php?$uri&$args;  // <= ?
    set $new_uri $uri;
  }

Thanks

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: