Nginx 404 in subfolder

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
leonvdkolk
Registered User
Posts: 9
Joined: Fri Aug 10, 2018 8:16 am

Nginx 404 in subfolder

Post by leonvdkolk »

Hi guys,

I have built a forum in a subfolder /forum but i have a problem with posting, sending private messages and reporting. Literally everything that needs a post request to for example posting.php, app.php fails in a 404. I think it has something to do with my subfolder /forum/ since this problem did not occur when i built the forum locally without a subfolder.

I am using nginx/ubuntu 16.04 with php7. 0. I am probably missing some nginx directives but i have tried nearly anything and i cannot get it to work.

7786#7786: *15 open() "web/error/503.html" failed (2: No such file or directory), client: 62.251.121.23, server:, request: "POST /forum/posting.php?mode=post&f=25 HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php7.0-fpm/web17.sock", host: "", referrer: "/forum/posting.php?f=25&mode=post&sid=48ae27367757fa9e7762b59ba960b441"

This is the only thing i can find in the error logs.
Does anyone know how to fix this?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Nginx 404 in subfolder

Post by Brf »

Please fill out the Support Request Template and post it back here to enable us to assist you better.
leonvdkolk
Registered User
Posts: 9
Joined: Fri Aug 10, 2018 8:16 am

Re: Nginx 404 in subfolder

Post by leonvdkolk »

Support Request Template
What version of phpBB are you using? phpBB 3.2.2
What is your board's URL? https://bit.ly/2Os3Mjq
Who do you host your board with? VPS
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What extensions do you have installed? Add user, Advanced BBCode Box, Advertisement Management, AJAX userinfo, Ban Hammer, Board Announcements, Board Rules, Favicon, Google Tag Manager, Live topic update, Pages, PN Welcome, Quick Login, Top Poster of the Month, User ranks list, VigLink
What styles do you currently have installed? proflat
What language(s) is your board currently using? nl (dutch)
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP and phpBB
What username can be used to view this issue? sjonniej
What password can be used to view this issue? Testing1234!
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? migating from local to live staging
Please describe your problem. When i migrated the board from a localhomain to a 'live' domain i mentioned that pages containing app.php/posting.php/ucp.php and some more are not working. They give back a 404 error. On the new domain the board url contains a subfolder (/forum) while on my localhomain it was set up in the root. There i had no problems, with the subfolder i have. The strange thing is that in same folder where app.php etc are located, i am able to directly approach test.php and it gives back its content.

i am runnig nginx, mysql5 and php7 fpm.
Generated by SRT Generator
Last edited by leonvdkolk on Fri Aug 10, 2018 2:22 pm, edited 1 time in total.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Nginx 404 in subfolder

Post by Brf »

leonvdkolk wrote: Fri Aug 10, 2018 12:41 pm
What username can be used to view this issue? Test
What password can be used to view this issue? Test1234!
That is an inactive account. We cannot login with it.
leonvdkolk
Registered User
Posts: 9
Joined: Fri Aug 10, 2018 8:16 am

Re: Nginx 404 in subfolder

Post by leonvdkolk »

Im sorry. I provided new credentials

user: sjonniej
pass: Testing1234!
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Nginx 404 in subfolder

Post by Brf »

In your Admin control panel, check the Server Settings page. What are in the Server URL settings at the bottom?
leonvdkolk
Registered User
Posts: 9
Joined: Fri Aug 10, 2018 8:16 am

Re: Nginx 404 in subfolder

Post by leonvdkolk »

Force URL Settings: Yes
Serverprotocol: https://
Domainname: XXX
Server port: 443
Script path: /forum

Seems good to me.
Last edited by leonvdkolk on Mon Aug 13, 2018 12:37 pm, edited 1 time in total.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: Nginx 404 in subfolder

Post by Mick »

Your cookie path should be / see Knowledge Base - Fixing incorrect cookie settings.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
leonvdkolk
Registered User
Posts: 9
Joined: Fri Aug 10, 2018 8:16 am

Re: Nginx 404 in subfolder

Post by leonvdkolk »

Mick wrote: Sat Aug 11, 2018 8:04 am Your cookie path should be / see Knowledge Base - Fixing incorrect cookie settings.
My cookie path was set to /forum as well so i changed it to / but no effect to 404-errors. What does a cookie path has to do with not reaching certain files properly? I think it has to do with other things.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: Nginx 404 in subfolder

Post by Mick »

The board path is correct as /forum but the cookie path must be as mentioned. I agree, it may not be anything to do with your issue but the cookie settings are important and need to be right. You’ll never know until you try it. The settings are ok now.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
leonvdkolk
Registered User
Posts: 9
Joined: Fri Aug 10, 2018 8:16 am

Re: Nginx 404 in subfolder

Post by leonvdkolk »

Mick wrote: Sat Aug 11, 2018 8:12 am The board path is correct as /forum but the cookie path must be as mentioned. I agree, it may not be anything to do with your issue but the cookie settings are important and need to be right. You’ll never know until you try it. The settings are ok now.
Thank you. I have changed it.

My problem might be fixed with some nginx vhost directives. But i am unsure how.. Anyone have advice?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Nginx 404 in subfolder

Post by stevemaury »

Would ngnix support be a more appropriate venue?
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Nginx 404 in subfolder

Post by 3Di »

leonvdkolk wrote: Sat Aug 11, 2018 7:51 am Force URL Settings: Yes
Serverprotocol: https://
Domainname: ajax.clubfans.nl
Server port: 443
Script path: /forum

Seems good to me.
try t don't force URL rewrite if that's it,
you try to use support provided for nginx by phpBB located in the /docs/ folder, see nginx.sample.

There are some useful infos, if you search: https://www.phpbb.com/search/?q=nginx
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
leonvdkolk
Registered User
Posts: 9
Joined: Fri Aug 10, 2018 8:16 am

Re: Nginx 404 in subfolder

Post by leonvdkolk »

Already tried that, did not work. :-(
Last edited by Mick on Sun Aug 12, 2018 11:54 am, edited 1 time in total.
Reason: Removed unnecessary quoting.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: Nginx 404 in subfolder

Post by Mick »

Have you spoken to nginx support as suggested?
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Post Reply

Return to “[3.2.x] Support Forum”