Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Blocked host: journal.xxxx.com #27

Open
jdevang opened this issue Oct 6, 2021 · 2 comments
Open

Blocked host: journal.xxxx.com #27

jdevang opened this issue Oct 6, 2021 · 2 comments
Labels
docker help wanted Extra attention is needed

Comments

@jdevang
Copy link

jdevang commented Oct 6, 2021

I'm running this is docker. Took the changes from the unmerged pull request as well for the docker-compose file
Error:

To allow requests to journal.xxxx.com, add the following to your environment configuration:

config.hosts << "journal.xxxx.com"

This happens even though I have a SITE_DOMAIN env in the production.rb file. Tried hardcoding the domain instead of passing it as an env, still having the issue.

@inoda inoda added help wanted Extra attention is needed docker labels Jul 30, 2022
@lotus647
Copy link

The error message you encountered suggests that the host journal.xxxx.com is not recognized or allowed in the configuration. This issue can occur if the host is not explicitly defined in the application's configuration files.

To resolve this problem, you can try the following steps:

  1. Open the production.rb file located in the config directory of your Journal application.

  2. Look for the config.hosts configuration line. It should be an array that allows specific hosts for the application. If the line is not present, you can add it at the end of the file.

  3. Add the host journal.xxxx.com to the config.hosts array. It should look like this:
    config.hosts << "journal.xxxx.com"

Replace journal.xxxx.com with the actual domain you want to use.

  1. Save the changes to the production.rb file.

  2. If you made changes to the production.rb file inside the Docker container, rebuild the container to apply the modifications. Use the appropriate commands based on your Docker setup.

Once you've added the journal.xxxx.com host to the config.hosts array, the application should recognize and allow requests to that domain. Make sure to restart your Docker container to ensure the changes take effect.

@MichayG
Copy link

MichayG commented Mar 30, 2024

Check your reverse proxy configuration mentioned in the docs. In my case I was using Synology's GUI to setup nginx and I left a rogue semi-colon while copy-pasting.

image

You will also have issues if you try to pass multiple domains to the env variable:
SITE_DOMAIN=journal.my-domain.com,diary.my-domain.com

This is because the ruby code will not split your domains into an array.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docker help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants