# Apache 302 error when posting on phpbb

**URL:** <https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358>\
**Category:** Troubleshooting\
**Tags:** apache\
**Created:** [19 February 2024 22:51 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358 "2024-02-19T22:51:36Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [19 February 2024 22:51 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/1 "2024-02-19T22:51:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [19 February 2024 22:58 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/2 "2024-02-19T22:58:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [20 February 2024 08:44 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/3 "2024-02-20T08:44:57Z")

</div>

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](https://dietpi.com/docs/software/webserver_stack/#__tabbed_8_1) are available via `journalctl`:

```auto
journalctl -u apache2

```

---

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [20 February 2024 11:40 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/4 "2024-02-20T11:40:18Z")

</div>

Hey Jappe. The log is fine

```auto
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

```auto
*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

```

---

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [20 February 2024 11:54 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/5 "2024-02-20T11:54:12Z")

</div>

RuTorrent POST but no redirect error.

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [20 February 2024 12:19 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/6 "2024-02-20T12:19:05Z")

</div>

> [@Jappe](#):
>
> Did you install everything via `dietpi-software` or did you changed something manually?

Did you?

---

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [20 February 2024 14:11 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/7 "2024-02-20T14:11:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [20 February 2024 14:29 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/8 "2024-02-20T14:29:53Z")

</div>

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:

```auto
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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [20 February 2024 19:36 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/9 "2024-02-20T19:36:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [20 February 2024 22:32 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/10 "2024-02-20T22:32:24Z")

</div>

9.1.1  
6.1.0-18-amd64  
PHPbb: 3.3.11

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [20 February 2024 22:37 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/11 "2024-02-20T22:37:08Z")

</div>

Okay, version 3.3.11 should support php8.2.

> [@Darron](#):
>
> Redirect to 443 removed by me.

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

```auto
 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]

```

---

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [20 February 2024 22:55 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/12 "2024-02-20T22:55:36Z")

</div>

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?

```auto
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]

```

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [21 February 2024 06:34 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/13 "2024-02-21T06:34:49Z")

</div>

> [@Darron](#):
>
> What file is this?

This is from `dietpi-letsencrypt`.

---

<div class="post-metadata">

**Author:** ![Darron](https://dietpi.com/forum/user_avatar/dietpi.com/darron/32/2172_2.png) [@Darron](https://dietpi.com/forum/u/Darron)\
**Post date:** [21 February 2024 11:41 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/14 "2024-02-21T11:41:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [21 February 2024 11:59 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/15 "2024-02-21T11:59:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [17 August 2024 23:59 UTC](https://dietpi.com/forum/t/apache-302-error-when-posting-on-phpbb/19358/16 "2024-08-17T23:59:49Z")

</div>

Closed on 17 August 2024 23:59 UTC

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.
