john3 is trying to set up Discourse on a subfolder (/community) but encounters a blank page with 404 errors for assets. He followed the official guide but gets a PostgreSQL authentication error when running discourse remap, and his nginx config and YAML setup appear misconfigured. The site worked fine on a subdomain before, but after bootstrapping, assets are requested from the root (/assets/...) instead of /community/assets/..., while uploads work correctly under /community/uploads/. neil suggests the database shouldn’t be affected by subfolder config and questions why public/community doesn’t exist despite logs indicating its creation. john3 confirms uploads work but assets and links still point to the wrong paths. neil shares a corrected YAML snippet including rake assets:precompile, which john3 tries — but now gets double /community/community/uploads and still broken asset paths. neil admits he can’t diagnose the mix of issues (DB, paths, assets) and recommends reverting to subdomain. Ultimately, john3 resolves it by destroying and rebuilding all containers from scratch.
@neil Yes, the site was working fine on the subdomain. But, after bootstrapping its unable to find resources i.e. it’s looking for assets/stylesheets and other resources in sub.domain.org/* instead of sub.domain.org/community. but, uploads files are fine with path sub.domain.org/community/uploads/.
Is it because of the previous database? as that was on the subdomain.
Also, I am not sure if community should exist in the public as in logs it shows:
I, [2018-08-31T20:27:08.692777 #14] INFO -- : > cd /var/www/discourse && mkdir -p public/community
I, [2018-08-31T20:27:08.696953 #14] INFO -- :
I, [2018-08-31T20:27:08.697067 #14] INFO -- : > cd /var/www/discourse && cd public/community && ln -s ../uploads && ln -s ../backups
....
but then in the container:
[root@server discourse]# sudo ./launcher enter app
which: no docker.io in (/sbin:/bin:/usr/sbin:/usr/bin)
root@discourse:/var/www/discourse# cd public/community
bash: cd: public/community: No such file or directory
The database should not have changed just because you added configuration for subfolder. Also, even though you can see that public/community is being created, it doesn’t exist. This is very confusing. I can’t tell what’s wrong with your setup so I don’t know how to help.
gives me /community/community/uploads rather than /community/uploads/. But assets/stylesheets remain the same as before i.e. instead of being located in the community folder, the site is searching these files in sub.domain.org.
I can’t tell what the cause of all your problems (can’t connect to db, multiple /community directories, wrong assets path, etc…) is from this topic. and I’ve never seen those problems from a subfolder config before. I recommend going back to subdomain.