Olá. Instalei o Discourse em um servidor CentOS. Também utilizo o painel web CentOS.
Parece que os arquivos no Discourse não estão sendo comprimidos, embora ele devesse usar Brotli por padrão e fazer fallback para Gzip.
Exemplo para este arquivo, que tem 2,2 MB: https://forum.canapin.win/assets/application-301651b1c7400a000974a9cecafd44ad3304cf647cf17bcfa7af68e9ed1ac4b7.js
Cabeçalhos de Resposta:
accept-ranges: bytes
cache-control: max-age=31536000
cache-control: public,immutable
content-length: 2334732
content-type: application/javascript
date: Sat, 12 Oct 2019 23:36:50 GMT
expires: Sun, 11 Oct 2020 23:36:50 GMT
last-modified: Sat, 12 Oct 2019 23:33:24 GMT
server: nginx/1.16.1
status: 200
To be very precise about how I installed Discourse, here are the steps I followed:
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
cp samples/standalone.yml containers/app.yml
Changed my ports here:
## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
- "8080:80" # fwd host port 80 to container port 8080 (http)
- "4443:443" # fwd host port 443 to container port 4443 (https)
./launcher bootstrap app
./launcher start app
And redirected my port in my nginx configuration in centos web panel:
Thank you. I don’t know much about servers and stuff like this and I don’t know how I can achieve that. I previously used Plesk with its default settings and it was working perfectly even with nginx proxying.