aaronk
Novembre 28, 2020, 9:57
1
J’utilise un serveur virtuel chez Host Europe. J’ai quelques questions concernant les paramètres DNS et SMTP.
Voici les paramètres DNS :
Nom d'hôte Enregistrement Adresse IP
forum.example.com A 178.77.99.191
Ai-je besoin d’une entrée CNAME ? Si oui, quelle est la bonne entrée ?
J’ai ajouté un compte e-mail postmaster@example.com pour le SMTP.
DISCOURSE_DEVELOPER_EMAILS: 'forum@example.com'
DISCOURSE_SMTP_ADDRESS: mailout.example.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: postmaster@example.com
DISCOURSE_SMTP_PASSWORD: aUd34cdWKCu6CTjfoH7ykk
Après le démarrage de Discourse, j’obtiens le message d’erreur indiquant que le port 443 est déjà utilisé. C’est effectivement vrai. Comment résoudre ce problème ?
Le port 443 est déjà utilisé. Cela peut être dû à plusieurs raisons, notamment la présence d’un autre serveur web déjà en cours d’exécution sur votre serveur.
Vous pouvez vérifier si c’est le cas avec cette commande :
netstat -alpn | grep 443
aaronk
Novembre 28, 2020, 11:13
3
httpd fonctionne sur le port 443. Il s’agit du site web example.com . Le forum doit fonctionner sur un sous-domaine forum.example.com . Quel port dois-je utiliser ?
Voici la sortie de netstat -alpn | grep 443
[root@vserver ~]# netstat -alpn | grep 443
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 28853/sw-cp-server:
tcp 0 0 178.77.99.191:8443 185.243.71.165:58504 TIME_WAIT -
tcp 0 0 178.77.99.191:8443 185.243.71.165:58482 TIME_WAIT -
tcp 0 0 178.77.99.191:8443 185.243.71.165:58514 TIME_WAIT -
tcp6 0 0 :::443 :::* LISTEN 2517/httpd
tcp6 0 0 :::8443 :::* LISTEN 28853/sw-cp-server:
tcp6 0 0 178.77.99.191:443 185.243.71.165:46544 TIME_WAIT -
tcp6 0 0 178.77.99.191:443 185.243.71.165:46542 TIME_WAIT -
Vous devrez suivre ce guide pour configurer Discourse avec Apache2.
It’s not as daunting as it sounds!
While this may sound a bit intimidating at first, it’s really not all that bad. You basically need to do two things:
Install HAProxy (or an alternative) which will take over port 80 and then divert your Discourse traffic to your docker container, and all your other sites to your usual Apache set-up.
Let Apache know which port to listen for.
While this is only a rough guide, it should do a good job of pointing you in the right direction. Let’s get star…