# Haproxy, Nginx and theme Deepthought giving a 301

**URL:** <https://zola.discourse.group/t/haproxy-nginx-and-theme-deepthought-giving-a-301/2892>\
**Category:** Support\
**Created:** [January 10, 2026, 2:04pm UTC](https://zola.discourse.group/t/haproxy-nginx-and-theme-deepthought-giving-a-301/2892 "2026-01-10T14:04:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jradxl](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@jradxl](https://zola.discourse.group/u/jradxl)\
**Post date:** [January 10, 2026, 2:04pm UTC](https://zola.discourse.group/t/haproxy-nginx-and-theme-deepthought-giving-a-301/2892/1 "2026-01-10T14:04:56Z")

</div>

I’m using Zola for the first time where I am deploying using Nginx behind a Haproxy reverse proxy.  
I’m using the Deepthought theme as a result of watching the Jamstack YouTube videos.

My site works fine via `zola serve` but when deployed via Haproxy I get a problem.  
When I request for example, `https://zola.mydomain.uk/about/` I get a 301 request where the Nginx instance returns, `https://zola.mydomain.uk:1234/about/` where the 1234 is the port number set in Nginx and used by the Backend in Haproxy.

If I change my theme to Tabi, this problem goes away.

I can mitigate the Deepthought issue by modifing the http-response in the Haproxy backend, thus:-

`backend be_zolawebsite`  
`mode http`  
`http-response set-header location %[res.hdr(location),regsub(:1234/,/)] if { res.hdr(location) -m found }`  
`server svr_zolawebsite localhost:1234 ssl verify none`

My diagnosis seems to imply this is theme related, and a 301 request seems odd for an internal website page change.

I notice that Deepthought has not been updated for 3 years, whereas Tabi has been released in 2025, with an update last week.

Would I be advised to use the younger theme?

Is the use of a 301 for a page change usual for Zola websites?  
Otherwise, is there some sort of interaction I’m not aware of for Zola & Deepthought?

Thanks

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [January 10, 2026, 2:25pm UTC](https://zola.discourse.group/t/haproxy-nginx-and-theme-deepthought-giving-a-301/2892/2 "2026-01-10T14:25:05Z")

</div>

Are you running `zola serve` to serve your site? It’s a local development only server, it’s not meant to be ran publicly.

---

<div class="post-metadata">

**Author:** ![jradxl](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@jradxl](https://zola.discourse.group/u/jradxl)\
**Post date:** [January 10, 2026, 2:34pm UTC](https://zola.discourse.group/t/haproxy-nginx-and-theme-deepthought-giving-a-301/2892/3 "2026-01-10T14:34:56Z")

</div>

No I’m not. I am using `zola build` and copying all the files to a directory on the server running Nginx.

---

<div class="post-metadata">

**Author:** ![jradxl](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@jradxl](https://zola.discourse.group/u/jradxl)\
**Post date:** [January 10, 2026, 6:29pm UTC](https://zola.discourse.group/t/haproxy-nginx-and-theme-deepthought-giving-a-301/2892/4 "2026-01-10T18:29:10Z")

</div>

Found the solution….

```auto
navbar_items = [
{ code = “en”, nav_items = [
{ url = “$BASE_URL/”, name = “Home” },
{ url = “$BASE_URL/posts/”, name = “Posts” },
{ url = “$BASE_URL/tags/”, name = “Tags” },
{ url = “$BASE_URL/categories/”, name = “Categories” },
{ url = “$BASE_URL/about/”, name = “About Me” }
] },
]

In the above array, the urls must have a trailing slash, as shown.
Maybe that covers up a bug in the template, or the authors of the theme never used it via a reverse proxy. I guess the 301 was just coming from Haproxy or Nginx as the page without the trailing slash couldn't be found.

```
