Links to content change the url in address bar but do not load

Hi,

I just hosted the initial version of my personal webiste by generating the public directory with hugo and rsync to the server. Nginx is serving my content.

The hugo server version of the site works perfectly on my local machine, but the deployed on does not redirect to any links I click on. In fact all of the links on the page, no matter the address redirect to the home page, keeping the url of the clicked link.

hugo.toml is as follows:

baseURL = "https://strezoski.com/"
languageCode = "en-us"
theme = "poison"

[params]

    brand = "Strezoski"                      
    remote_brand_image = '' 
    description = "a" 
    dark_mode = false                      
    front_page_content = ["posts"] 

    menu = [
        {Name = "About", URL = "/about/"},
        {Name = "Posts", URL = "/posts/"}
    ]
    
    rss_section = "posts"

[taxonomies]
    series = 'series'
    tags = 'tags'

Is there a specific chunk of configuration I am missing?

I don’t think it’s redirecting to the home page. I can see that the URL does indeed change upon clicking the links on your website. It’s just that the same page is served irrespective of the URL.

This issue appears to come from Nginx, I suppose. I don’t personally use it but maybe this article might help:

1 Like

Thanks for the hint @UtkarshVerma , I tried it before but still getting the same result. Here is my virtual host file:

server {

    server_name strezoski.com;

    root /home/strezoski/srv/strezoski.com/;

     # Add index.php to the list if you are using PHP
     index index.html;

     location / {
         try_files $uri / ;
     }


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/strezoski.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/strezoski.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}

Checked the XML generated index on the server, also seems to be good. Tried Apache as the host, but the site still behaves the same. I suspect something is wrong with the generated public folder for the theme… so I’m still debugging.

Fixed by reinstalling nginx!

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