phpbb 3.2.7 + nginx sample config from docs

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Crew
Registered User
Posts: 33
Joined: Tue Mar 11, 2008 7:52 pm

phpbb 3.2.7 + nginx sample config from docs

Post by Crew »

Fresh installed phpbb 3.2.7 on nginx/1.16.1.
I took nginx.sample.conf from ./docs folder as sample for my nginx config.
But can someone tell me why I got errors like

Code: Select all

x.x.x.x. - - [16/Sep/2019:15:44:35 +0300] "GET /adm/images/phpbb_logo.png HTTP/1.1" 404 118 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
x.x.x.x. - - [16/Sep/2019:15:45:21 +0300] "GET /adm/images/phpbb_logo.png HTTP/1.1" 404 118 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
if I enable this part of config:

Code: Select all

        # Deny access to internal phpbb files.
        location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) {
            deny all;
            # deny was ignored before 0.8.40 for connections over IPv6.
            # Use internal directive to prohibit access on older versions.
            internal;
        }
After a little investigation I can tell that it looks like the problem is in (?<!ext/)phpbb regexp. At least everything works fine after removing this. But why?

User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 790
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: phpbb 3.2.7 + nginx sample config from docs

Post by AbaddonOrmuz »

It was added to deny access to internal files from the /phpbb/ directory, except the ones from /ext/phpbb/ (official extensions).

However that error is not so important since the only one affected are admins, it just prevents showing an image, at least right now.

You could replace (?<!ext/)phpbb with (?<!ext/)phpbb(?!\w+) to not match the image.
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:

Post Reply

Return to “[3.2.x] Support Forum”