Re: fastcgi path configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Always take a minute or two to read the error and understand what the error means/saying.

It is pretty much self explanatory. It is failing opening httpobject.js file (you can clearly see its trying to read it from  htdocs/js instead of htdocs/public_html/js) and where this is being called from is index.php.

You can use browser dev tools to figure out JS/CSS issues: https://developers.google.com/web/tools/chrome-devtools/_javascript_ You should be seeing a 404 on that file.

I would suggest you learn HTML/JS/CSS first before attempting to work with PHP, it will make it much more easier down the line. Many people start with PHP, and learn it the other way but based on my experience it will make it harder in the long run.

On Sun, Mar 15, 2020 at 10:17 AM Mahmood Naderan <mahmood.nt@xxxxxxxxx> wrote:
Hi
With php 5.3, I have these configurations in the nginx

        location ~ \.php$ {
            root           /home/ubuntu/htdocs/public_html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/ubuntu/htdocs/public_html/$fastcgi_script_name;
            include        fastcgi_params;
        }

That script path contains

ubuntu@fr13:~$ l htdocs/
build.xml  classes/  controllers/  etc/  includes/  index.html  lib/  public_html/  views/

ubuntu@fr13:~$ l htdocs/public_html/
addAttendee.php        checkUser.php             fileService.php   logout.php            upcomingEvents.php
addDeleteFriend.php    css/                      findUsers.php     phpinfo.php           users.php
addEvent.php           deleteAttendee.php        friends.php       postedEvents.php      xsl/
addEventResult.php     deleteCommentsRating.php  getAppConfig.php  rateit.php            yourUpcomingEvents.php
addPerson.php          deleteEvent.php           images/           rejectInvite.php
addPersonResult.php    events.php                index.php         requestCityState.php
approveFriendship.php  favicon.ico               js/               revokeInvite.php
calendar.php           feedFromDB.php            login.php         taggedEvents.php

ubuntu@fr13:~$ l htdocs/public_html/js/
controls.js  dragdrop.js  effects.js  httpobject.js  prototype.js  starrating.js  validateform.js



When I open the browser and enter localhost/index.php, I can see some contents, e.g. large and small text fonts, but in the nginx error log, I see entries such as:

2020/03/15 17:37:17 [error] 2145#0: *20 open() "/home/ubuntu/htdocs/js/httpobject.js" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /js/httpobject.js HTTP/1.1", host: "localhost", referrer: "http://localhost/index.php"


Where in the configuration is wrong? I don't see anything weird.


Regards,
Mahmood




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux