Mover de directorio a subdominio

Hola a todos,

Para hacer mi configuración menos complicada, siguiendo el consejo de @codinghorror, y dado que Let’s Encrypt ahora admite subdominios, decidí mover mi Discourse de foo.bar/forum a forum.foo.bar.

Lo que hice:

Cambié el nombre de dominio en mi app.yml, eliminé el remapeo de carpetas de los comandos personalizados, luego remapeé foo.bar/forum a forum.foo.bar mediante el remapeo de Discourse y, finalmente, rehorné las publicaciones.

El problema es el siguiente:

Cuando abro https://forum.foo.bar/, intenta cargar https://stylesheets/etc, lo que provoca que la visualización del foro se rompa y no puedo iniciar sesión ni cambiar el tema del sitio web.

¿Qué puedo hacer para solucionarlo?

Si es necesario, aquí está la URL de instalación: https://forum.legiochristi.com/
Mi app.yml: ## this is the all-in-one, standalone Discourse Docker container template### - Pastebin.com

Agradecería cualquier ayuda.

2 Me gusta

Okay I managed to log into the admin panel but I can’t seem to change the default theme since it’s dependent on JavaScript to apply.

I also can’t download my latest backup. Is there a way to do this in command line? Either change the theme or download a backup?

Thanks.

Have you tried safe-mode?

your.site/safe-mode

I’m getting this error when I try:

Chrome says it’s an invalid redirect.

Is there a way to do it through command line?

1 me gusta

If there is, I’m not aware of it.

Perhaps someone more knowledgeable can comment on that. :sunflower:

Hope so. I’ll probably nuke it and rebuild after I fetch my last backup.

You did a rebuild too? ./launcher rebuild app

Sure did.

The problem seems to be mostly that it’s trying to fetch https://stylesheets/file.css - I have no idea why that happened or how to fix it.

I see the files present in the container but they’re just not called correctly.

It’s actually using hostname stylesheets there? Or what is the actual url?

You haven’t given enough for us to help you. Can you post your container’s yml file after removing credentials?

2 Me gusta

Yes it’s actually using hostname stylesheets.

My app.yml is in the first post.

https://pastebin.com/pZPw3Ju5

Your yml file still has the subfolder setting enabled:

DISCOURSE_RELATIVE_URL_ROOT: /

Delete that line from the file and rebuild again.

7 Me gusta

amazing

i’ll try that in a sec

Okay great that worked! Now the only thing left is to fix all my missing images. I’m getting a 404 on all uploaded avatars and uploaded images. Very odd.

Update:

All images return 404. I rebaked posts, recovered uploads from tombstone, and double-checked whether or not the images exist in the directories.

https://forum.legiochristi.com/uploads/default/original/1X/b104612ae2622e9ccfbb55197bb4e46059a7c171.png

this is 404

yet it exists both in /var/www/discourse/public/uploads/default/original/1X and in /shared/uploads/default/original/1X (which is symlinked successfully, therefor)

I’m at a loss here.

Okay I just restored a week old backup and that didn’t help.

I also tried to chmod the uploads directory to 777

Does anyone have any ideas?

@Ironclad14, me estoy enfrentando al mismo problema que tú. Me preguntaba si ya encontraste cómo solucionarlo. Si es así, ¿podrías compartirlo?

¡Gracias de antemano!