Unable to see a php page

Mahmood Naderan mahmood.nt at gmail.com
Mon Mar 16 18:10:40 UTC 2020

OK with this configuration:

        location ~ \.php$ {
            root           /home/ubuntu/htdocs/public_html;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME
            include        fastcgi_params;

and the following folder structure

$ ls ~/htdocs/
build.xml  classes  controllers  etc  includes  index.html  lib
 public_html  views
$ ls ~/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
addPersonResult.php    events.php                index.php
approveFriendship.php  favicon.ico               js
calendar.php           feedFromDB.php            login.php
$ ls ~/htdocs/public_html/js/
controls.js  dragdrop.js  effects.js  httpobject.js  prototype.js
 starrating.js  validateform.js

when I open "localhost/index.php", I can see the php page, however, in the
logs/error.log I see these

2020/03/16 21:34:22 [error] 5821#0: *2 FastCGI sent in stderr: "PHP
message: PHP Warning:  session_start() [<a
open(/tmp/http_sessions/sess_dd0e14b5b3f5aebcb53015b6bebc3bfa, O_RDWR)
failed: No such file or directory (2) in
/home/ubuntu/htdocs/public_html/index.php on line 26

Also I see somethings like

2020/03/16 21:34:22 [error] 5821#0: *2 open()
"/home/ubuntu/htdocs/js/dragdrop.js" failed (2: No such file or directory),
client:, server: localhost, request: "GET /js/dragdrop.js
HTTP/1.1", host: "localhost", referrer: "http://localhost/index.php"

I don't know why it is using "/home/ubuntu/htdocs/js/dragdrop.js"?
According to the setting, it should look for it at
"/home/ubuntu/htdocs/public_html/js/dragdrop.js" where the file actually

I know that is not directly related to nginx, but I appreciate any feedback.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20200316/1031dc39/attachment.htm>

More information about the nginx mailing list