You can do one of two things, both quite straight forward.  First, you can build it with the --prefix set to something other than /usr/local/nginx or you can supply a full-path with your configurations &quot;root&quot; directive.<br>
<br>You should have in your config somewhere a line like this:<br><br>root html;<br><br>Changing it like this should help:<br><br>root /var/www;<br><br>Of course you should replace /var/www with the proper root.  Also, for sub-locations that need a separate root, you may find the &quot;alias&quot; directive useful, like so:<br>
<br>server {<br>  listen 80;<br>  root /var/www;<br>  location /funstuff {<br>    alias /home/me/funstuff;<br>  }<br>}<br><br>- Merlin<br><br><div class="gmail_quote">On Wed, Feb 25, 2009 at 1:21 PM, Yaax Yaax <span dir="ltr">&lt;<a href="mailto:lists@ruby-forum.com">lists@ruby-forum.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am new user of nginx, I installed it as replace of apache on cpanel<br>
server for one very busy site.<br>
I installed it to default folder /usr/local/nginx and setup it working<br>
with php fastcgi spawn, but it only works from nginx default root i.e.<br>
only from /usr/local/nginx/html<br>
<br>
I need its root to be changed for different vhosts paths like<br>
/home/user/public_html but look like all my commands like root<br>
/home/user/public_html; are some why ignored by nginx and it is always<br>
trying to run files from /usr/local/nginx/html<br>
<br>
I checked in error log - and there are no errors displayed - only in<br>
access log I see message that file not found 404 error.<br>
<br>
Can anyone help me with this basic setup?<br>
<font color="#888888">--<br>
Posted via <a href="http://www.ruby-forum.com/" target="_blank">http://www.ruby-forum.com/</a>.<br>
<br>
</font></blockquote></div><br>