SITE_URL is not set or is localhost. Skipping URL post-processing. - beside a complete config.sh.local in site dir's root #34

Closed
opened 2025-07-11 13:28:40 +02:00 by fbird · 2 comments

Hello Stefano,

Just found out about BSSG. First in action in your blog, then the code, thank you!

Trying to test it with a FreeBSD fresh jail: bash, mark socat parallel sudo installed. The init step done following Recommended Setup: Separating Content from Core with automatic config loading

It seems everything is fine, main page loaded (behind and Nginx rev. proxy), but I've got this error/status message after starting the server, and no link works. Everything points to http://localhost:8000/:

Post-processing URLs with SITE_URL...
SITE_URL is not set or is localhost. Skipping URL post-processing.

Got a green
"Build process completed in 1 seconds"
"Build complete."

I've checked the config.sh sourcing the config.sh.local file from the separate site directory's root, for example /usr/local/testsite1/config.sh.local

Te site specific config.sh.local contains everything you sampled in the README.md.

tests so far:

  • run the server with root and www users, (hence the sudo, I tend to run every service as a dedicated/non-root user)
  • checked the config files multiple times
  • not just the Home, etc link are wrong, but the theme setup is missing too.

All in all I'm guessing I overstepped something, but I couldn't find it, please let me know how can I make BSSG really load it recommended config.sh.local file :)

Hello Stefano, Just found out about BSSG. First in action in your blog, then the code, thank you! Trying to test it with a FreeBSD fresh jail: `bash, mark socat parallel sudo` installed. The init step done following [Recommended Setup: Separating Content from Core](https://brew.bsd.cafe/stefano/BSSG#recommended-setup-separating-content-from-core) with automatic config loading It seems everything is fine, main page loaded (behind and Nginx rev. proxy), but I've got this error/status message after starting the server, and no link works. Everything points to `http://localhost:8000/`: ``` Post-processing URLs with SITE_URL... SITE_URL is not set or is localhost. Skipping URL post-processing. ``` Got a green "Build process completed in 1 seconds" "Build complete." I've checked the config.sh sourcing the config.sh.local file from the separate site directory's root, for example /usr/local/testsite1/config.sh.local Te site specific config.sh.local contains everything you sampled in the README.md. tests so far: - run the server with root and www users, (hence the sudo, I tend to run every service as a dedicated/non-root user) - checked the config files multiple times - not just the Home, etc link are wrong, but the theme setup is missing too. All in all I'm guessing I overstepped something, but I couldn't find it, please let me know how can I make BSSG really load it recommended config.sh.local file :)
Owner

Hi! The embedded server should not be used for deploying in production, as it's just supposed to be used for a local preview. The correct approach is build the website using "./bssg.sh build" - you'll have the full website built (with the correct links) into the output/ directory.
Those files should be directly served by nginx, so move them into the proper directory. This way, you don't need to set the reverse proxy, but nginx will be able to serve the files.

Hi! The embedded server should not be used for deploying in production, as it's just supposed to be used for a local preview. The correct approach is build the website using "./bssg.sh build" - you'll have the full website built (with the correct links) into the output/ directory. Those files should be directly served by nginx, so move them into the proper directory. This way, you don't need to set the reverse proxy, but nginx will be able to serve the files.
Author

Hi!

Thanks for the quick answer, in the meaning time I've found that, running a separate bssg.sh build works as intended, but running the ./bssg.sh server do not results in the same build result and overrides with a wrong build. I guess there's should be some difference with the sourcing of the config.sh.local file comparing to the build.

So now a separate:

  • bssg.sh build
  • ./bssg.sh server --no-build is a way to workaround it.

@stefano wrote in #34 (comment):

Hi! The embedded server should not be used for deploying in production, as it's just supposed to be used for a local preview. The correct approach is build the website using "./bssg.sh build" - you'll have the full website built (with the correct links) into the output/ directory. Those files should be directly served by nginx, so move them into the proper directory. This way, you don't need to set the reverse proxy, but nginx will be able to serve the files.

Got you, however I do not intend to run Nginx twice (third time. etc.). I have an NGINX rev. proxy running separately already. This BSSG jail would the "N"th web provider uplink for that rev. proxy with other stuff proving their web code to be served with a rev. proxy by default. Do you have some low memory/CPU footprint static site web server recommendation for BSSG?

I'm seeing a RUST "static-web-server, and G-WAN now.

Hi! Thanks for the quick answer, in the meaning time I've found that, running a separate `bssg.sh build` works as intended, but running the `./bssg.sh server` do not results in the same build result and overrides with a wrong build. I guess there's should be some difference with the sourcing of the config.sh.local file comparing to the build. So now a separate: - `bssg.sh build` - `./bssg.sh server --no-build` is a way to workaround it. @stefano wrote in https://brew.bsd.cafe/stefano/BSSG/issues/34#issuecomment-288: > Hi! The embedded server should not be used for deploying in production, as it's just supposed to be used for a local preview. The correct approach is build the website using "./bssg.sh build" - you'll have the full website built (with the correct links) into the output/ directory. Those files should be directly served by nginx, so move them into the proper directory. This way, you don't need to set the reverse proxy, but nginx will be able to serve the files. Got you, however I do not intend to run Nginx twice (third time. etc.). I have an NGINX rev. proxy running separately already. This BSSG jail would the "N"th web provider uplink for that rev. proxy with other stuff proving their web code to be served with a rev. proxy by default. Do you have some low memory/CPU footprint static site web server recommendation for BSSG? I'm seeing a RUST "static-web-server, and G-WAN now.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stefano/BSSG#34
No description provided.