Nginx help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    Nginx help

    Hi...
    I installed nginx in to fedora core 4 to host few php pages.

    it is in /usr/local/nginx

    config file look like:

    location ~ \.php$ {
    root html;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script _name;
    include fastcgi_params;
    }

    So basically my php file is in .usr/local/nginx/html
    But in browser it says file is unavailable.(al l files even index.php)

    What may be error?
    I have started my server.
    and php file gets compiled in terminal.

    And sorry for posting it here.. i did not find any other topic to post.

    Regards
    Dheeraj Joshi
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    Nobody has posted any comments.
    Anyway i got the solution..

    I am planing to post installation steps here since nobody has commented.

    How is that?

    Comment

    • Canabeez
      New Member
      • Jul 2009
      • 126

      #3
      Originally posted by dheerajjoshim
      Hi...
      I installed nginx in to fedora core 4 to host few php pages.

      it is in /usr/local/nginx

      config file look like:

      location ~ \.php$ {
      root html;
      fastcgi_pass 127.0.0.1:9000;
      fastcgi_index index.php;
      fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script _name;
      include fastcgi_params;
      }

      So basically my php file is in .usr/local/nginx/html
      But in browser it says file is unavailable.(al l files even index.php)

      What may be error?
      I have started my server.
      and php file gets compiled in terminal.

      And sorry for posting it here.. i did not find any other topic to post.

      Regards
      Dheeraj Joshi
      I think you have some syntax errors in your config file, why do you include the fastcgi_params? This link might help you.

      Comment

      • Dheeraj Joshi
        Recognized Expert Top Contributor
        • Jul 2009
        • 1129

        #4
        Syntactically it is correct....

        It is working fine now...

        Comment

        Working...