So basically you are able to see your project when visiting your server ip but getting a 404 when redirected to the login? My guess is that your login address looks like 192.168.1.123/my_broken_project/login? You actually *can *use an ip address as a *server_name *but only one site will be available using that address (afaik) and it defeats the purpose of wanting to run multiple sites from a single IP. As Salines responded, you can use wildcards and regular expressions but I have zero experience in that area ... the need to never arose and using simple server names has always been more than sufficient for me.
As far as the root value in your config, that depends on how you have Cake set up. Basically, if you navigate to your webroot directory and have to go through an app directory to get there, then your root would be */var/www/my_broken_project/app/webroot*. As far as editing your /etc/hosts file ... yes, it affects only your local machine. If you want to only run a single project from a single ip address, it would be optional. If you are running multiple projects, it's mandatory (at least with the setup I've explained). There are other ways of reaching your dev server such as using a service like *dyn.com <http://dyn.com>*. The setup that I've explained may not be the *only *way, but in my opinion is the simplest, most straight-forward way to get yourself started with little or no experience with nginx and a local dev server. On Sun, Oct 26, 2014 at 6:26 AM, flashios09 <[email protected]> wrote: > thanks for all the explanation. > i forget to say that with *apache the same project worked correctly* -> i > don't have the 404 error after being redirected to the default login action > . > i have two more small question: > 1- for the root value in the config i write this > > root /var/www/my_broken_project/*webroot*; > > or this > > root /var/www/my_broken_project/*app/webroot*; > > 2- for your 4th point in the previous reply > *On your local machine (not your server) open /etc/hosts and add...* > is this a *necessary* step or *optional* because if i change the local > hosts file it affect only my local machine ? > thanks > ------------------------------ > View this message in context: Re: using cakephp with nginx > <http://cakephp.1045679.n5.nabble.com/using-cakephp-with-nginx-tp5719912p5719961.html> > Sent from the CakePHP mailing list archive > <http://cakephp.1045679.n5.nabble.com/> at Nabble.com. > > -- > 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 a topic in the > Google Groups "CakePHP" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/cake-php/saCWNRwkWhs/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/cake-php. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
