[solved] Links pointing to localhost instead base_url


I have problems getting Zola to wok on my setup. On my public server I have two VMs. One VM is running nginx as a reverse proxy, the other VM is running Zola. When running zola serve -i the website is accessable under https://some-url.com but all links are pointing to, i.e. The theme I used on this installation is also not applied, I just get a plain site with text. But I guess this is related to the “localhost-problem”.
When I start Zola with zola serve -i -u some-url.com the website won’t load at all.

What I’m doing wrong?

Here is my config.toml:

# Be sure to change these!
base_url = "https://some-url.com"

menu_items = [
    # each of these is optional, name and url are required
    # $BASE_URL is going to be substituted by base_url from configuration
    {name = "blog", url = "$BASE_URL"},

    # tags should only be enabled if you have "tags" taxonomy
    # see documentation below for more details
    {name = "tags", url = "$BASE_URL/tags"},
    {name = "archive", url = "$BASE_URL/archive"},

And here is the config of my reverse proxy:

server {
    listen 80;
    listen [::]:80;
    server_name some-url.com;

    location / {
        return 301 https://$host$request_uri;

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    location / {
        proxy_pass http://some-url.com:1111;

    server_name some-url.com;
    ssl_certificate /etc/letsencrypt/live/some-url.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/some-url.com/privkey.pem;
    ssl_session_timeout 1d;
    ssl_session_cache shared:MozSSL:10m;  # about 40000 sessions
    ssl_session_tickets off;

    # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam
#    ssl_dhparam /path/to/dhparam;

    # intermediate configuration
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers off;

    # HSTS (ngx_http_headers_module is required) (63072000 seconds)
    add_header Strict-Transport-Security "max-age=63072000" always;

Okay, after some more research I have now found out that ‘zola serve’ is actually only for testing and I have to use ‘zola build’ to build the website.

I have two config files, one for dev and one for production/release


# The URL the site will be built for
base_url = ""


# The URL the site will be built for
base_url = "https://mydomain.com"

Then use a makefile with the following

ZOLA = /opt/local/bin/zola
CONFIG_DEV = config.toml
CONFIG_PROD = config-production.toml

	$(ZOLA) build

	$(ZOLA) --config $(CONFIG_PROD) build

Then finally push (rsync in this case) to a remote machine.

	$(RSYNC) -av -e "ssh -i \"$(SSH_CERT_PATH)\"" $(OUTPUT_PATH) $(USER)@$(HOST):$(DEST_PATH)