Apache 302 error when posting on phpbb

Hi all, I have error 302 only when I create a post on PHPbb.
I have 2 instances of PHPbb, both errors are the same.
/DJ is slow, 20 seconds to post.
/mess-hall is fast but still 302.

Now I’ve moved these sites from /var/www to /mnt/SSD/var/www/
However Pihole, RuTorrent, phpmyadmin etc are still in /var/www

No error in /var/log/apache2/error.log, the error only shows up in the access log.
certbot installed with certificate.
redirect enabled or disabled makes no difference to post time, it still gives me a 302

000-default both show directory of /var/www no https redirect.
No big deal for me, I’ll probably stumble across the fault and fix it, but it’s puzzling me and I’ve been at this for 2 hours.
Yes I’ve made changes and restarted apache2.

Suddenly one step further, /DJ config had a force https redirect in ACP.
Still gives 302, but posts instantly.

Please provide more info through the troubleshoot template.
302 is a redirect error, so it sounds like a redirect loop when it takes so long for a request. I don’t think it’s related to slow file system reads.
Did you install everything via dietpi-software or did you changed something manually?
Apache logs are available via journalctl:

journalctl -u apache2

Hey Jappe. The log is fine

Feb 20 11:33:03 daz-stuff.uk systemd[1]: apache2.service: Deactivated successfully.
Feb 20 11:33:03 daz-stuff.uk systemd[1]: Stopped apache2.service - The Apache HTTP Server.
Feb 20 11:33:03 daz-stuff.uk systemd[1]: apache2.service: Consumed 4.291s CPU time.
Feb 20 11:33:23 daz-stuff.uk systemd[1]: Starting apache2.service - The Apache HTTP Server...
Feb 20 11:33:23 daz-stuff.uk systemd[1]: Started apache2.service - The Apache HTTP Server.
Feb 20 11:33:36 daz-stuff.uk systemd[1]: Stopping apache2.service - The Apache HTTP Server...
Feb 20 11:33:36 daz-stuff.uk systemd[1]: apache2.service: Deactivated successfully.
Feb 20 11:33:36 daz-stuff.uk systemd[1]: Stopped apache2.service - The Apache HTTP Server.
Feb 20 11:33:44 daz-stuff.uk systemd[1]: Starting apache2.service - The Apache HTTP Server...
Feb 20 11:33:44 daz-stuff.uk systemd[1]: Started apache2.service - The Apache HTTP Server.
Feb 20 11:35:36 daz-stuff.uk systemd[1]: Stopping apache2.service - The Apache HTTP Server...
Feb 20 11:35:36 daz-stuff.uk systemd[1]: apache2.service: Deactivated successfully.
Feb 20 11:35:36 daz-stuff.uk systemd[1]: Stopped apache2.service - The Apache HTTP Server.
Feb 20 11:35:36 daz-stuff.uk systemd[1]: Starting apache2.service - The Apache HTTP Server...
Feb 20 11:35:36 daz-stuff.uk systemd[1]: Started apache2.service - The Apache HTTP Server.

the access_log

*192.168.0.10 - - [20/Feb/2024:11:36:17 +0000] "POST /DJ/posting.php?mode=reply&t=518 HTTP/1.1" 302 -*
192.168.0.10 - - [20/Feb/2024:11:36:17 +0000] "GET /DJ/viewtopic.php?p=714 HTTP/1.1" 200 12687
192.168.0.10 - - [20/Feb/2024:11:36:17 +0000] "GET /mess-hall/daz/signature.png HTTP/1.1" 200 154823

RuTorrent POST but no redirect error.

192.168.0.xx - - [20/Feb/2024:11:51:23 +0000] "POST /rutorrent/php/setsettings.php HTTP/1.1" 200 -
192.168.0.xx - - [20/Feb/2024:11:51:23 +0000] "POST /rutorrent/plugins/httprpc/action.php HTTP/1.1" 200 25
192.168.0.xx - - [20/Feb/2024:11:51:23 +0000] "POST /rutorrent/plugins/create/action.php HTTP/1.1" 200 2

Did you?

Sorry Jappe.
Installed manually: 2x PHPbb forums, both years old, both previously hosted by 3rd party.
dietpi-software install:
pihole, apache2, phpmyadmin, php8.2, ruTorrent and certbot.

Configs for apache modified by me, except SSL. Redirect to 443 removed by me.

OK, so I have made some minor changes in ACP. They are fine, 200.
But when I make a new post it gives 302.
Now PHPbb does redirect you back to the post you just made once you hit submit. Removing the forced redirect in PBPbb ACP speeded things up to almost instant.

Admin Control Panel made some changes:

192.168.0.10 - - [20/Feb/2024:14:22:59 +0000] "POST /DJ/adm/index.php?i=acp_board&mode=load HTTP/1.1" 200 2642

Made a single post on the forum:

192.168.0.10 - - [20/Feb/2024:14:27:26 +0000] "POST /DJ/posting.php?mode=reply&t=518 HTTP/1.1" 302 -

I’m not sure if it’s normal and expected, but there’s no data bytes at the end, it’s just 302 -

Don’t worry about it Jappe, I came for a little advice/knowledge, it’s just a head scratcher. My OCD won’t let it drop.

Ok one more question, on which version are the phpBB instances?

9.1.1
6.1.0-18-amd64
PHPbb: 3.3.11

Okay, version 3.3.11 should support php8.2.

You are talking about apache config?
Did you also generate SSL certs without redirect?

 Domains  : [some.domain.com]                                          │
│      Email    : [foo@bar.baz]                                            │
│      Redirect : [Off] | Allows HTTP and HTTPS usage                          │
│      HSTS     : [On] | HTTP Strict Transport Security                        │
│      OCSP     : [Off] | No Online Certificate Status Protocol stapling       │
│      Key Size : [4096 bits]

443 redirect removed from 000-default.conf and 000-default-le-ssl.conf
In admin control panel (PHPbb) there’s also an option to force redirect, also off.

What file is this?

Domains  : [some.domain.com]                                          │
│      Email    : [foo@bar.baz]                                            │
│      Redirect : [Off] | Allows HTTP and HTTPS usage                          │
│      HSTS     : [On] | HTTP Strict Transport Security                        │
│      OCSP     : [Off] | No Online Certificate Status Protocol stapling       │
│      Key Size : [4096 bits]

This is from dietpi-letsencrypt.

I just run certbot from cli.
But I’ve checked dietpi-letsencrypt and no redirect.

Redirect from HTTP to HTTPS would need to be enabled manually within dietpi-letsencrypt. Other redirects are not managed by us directly.