Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Installation & Hosting

Too many directions causing apache to issue error 500

Solved by Vincent FERICELLI View solution

Started by Vincent FERICELLI 2 years ago · 8 replies · 528 views
2 years ago

Hi everyone !

I updated my blog to the last grav version and php 8.2 (it was running on php7.3 ...) and it now causes the apache server of my provider to issue error 500 because there is too many redirections.

I use the base .htaccess file and when I saw that the problem could come from that (according to the doc) I tried to tweak it by adding RewriteBase / and removing Options -Indexes.

I was able to display a simple info.php page but no page from my grav site.

I don't have much redir in my user/config/site.yaml

YAML
title: 'Le Krav-Club'
default_lang: fr
author:
  name: 'Vincent FERICELLI'
  email: c[email protected]
taxonomies:
  - category
  - tag
  - month
metadata:
  description: Vous voulez toutes les chances de votre coté en cas d'agression et progresser en Krav-Maga ? Les articles du Krav-Club sont là pour ça !
summary:
  enabled: true
  format: short
  size: 300
  delimiter: '==='
redirects:
  /fr/blog/(.*): '/articles/$1[301]'
  /en/blog/(.*): '/articles/$1[301]'
  /fr/articles/hiit$: '/articles/hiit-tabata[301]'
routes:
  /newsletter: /subscribe
blog:
  route: ''

Anyone has an idea of what is the problem?

EDIT : rephrase the .htaccess part to avoid misunderstanding

last edited 02/06/24 by Vincent FERICELLI
2 years ago

@kravclub.fr:
Anyone has an idea of what is the problem?

I could be disingenuous and say the problems are that you are trying to apply solutions you've used elsewhere and didn't RTFM, but that would be so unlike me 😆

Here's what you may have missed though:

2 years ago

I read the manual few years ago when I first set up my blog and later for the last upgrade I did (which included remaking my custom theme from scratch).

I never modified the .htaccess before and I checked it was identical to an new grav installation from scratch. I only tried to modify it because my upgraded site didn't work and it could be the problem according to https://learn.getgrav.org/16/troubleshooting/internal-server-error.

To be clearer my blog works before upgrading, in fact I rolled back my grav site and the php version : see kravclub.fr.

So I'm wondering what change(s) in grav or php combined with the related changes I made could cause such issue.

2 years ago

@kravclub.fr:
I read the manual few years ago when I first set up my blog and later for the last upgrade I did (which included remaking my custom theme from scratch).

From which Grav version did you update now?

2 years ago

@kravclub.fr,

First suggestion:

  • Try uncommenting the redirects section in /user/config/site.yaml
    Do you have folders like /user/kravclub.fr/config and/or /user/env/kravclub.fr/config?
    If so, also uncomment the redirect sections in all site.yaml file in these directories.
  • Is there a redirect inside frontmatter of the page?

NB. In your response to @hugbris:

I never modified the .htaccess before and I checked it was identical to an new grav installation from scratch.

Your statement "I use the base .htaccess file and tried to tweak it with RewriteBase / and commenting Options -Indexes ." is a bit confusing if you haven't changed anything. I also was initially under the impression you might have altered the .htaccess.

2 years ago

The version of grav before the upgrade was v1.6.19 according to the changelog.md file

I don't have a http://kravclub.fr/config folder or something like that or redirects inside the frontmatter of my pages.

I'll try without the redirects in /user/config/site.yaml

EDIT: i checked the frontmatter redir

last edited 02/06/24 by Vincent FERICELLI
2 years ago

@kravclub.fr,

The version of grav before the upgrade was v1.6.19 according to the changelog.md file

There are many, many incompatibilities and breaking changes between 1.6 and 1.7. I suggest to read the entire docs on upgrading from 1.6 to 1.7.

You might also want to check if plugins are compatible with 1.7.

👍 2
2 years ago

I started reading the migration doc, but I realize I didn't mention that the site works fine if I start a local server on my dev computer with php -S localhost:8080 system/router.php.

2 years ago Solution

Okay,

The issue was beetween Chair And Keyboard : the user directory was not transfered by my ftp client as it was a simlink.

I don't know why this caused redirection errors, but now every thing seems fine.

Thanks for your support

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by antoinep, 17 hours ago
5 63 11 hours ago
Installation & Hosting · by Jürgen Dietrich, 7 months ago
0 65 7 months ago
Installation & Hosting · by rappluk, 8 months ago
0 64 8 months ago
Installation & Hosting · by N, 12 months ago
3 76 12 months ago
Installation & Hosting · by Youle, 1 year ago
1 63 1 year ago