DNS and Discourse

AI-generated summary

A user, aaronk, is having trouble configuring DNS and SMTP settings for their Discourse instance on a virtual server from Host Europe. They are using an A record for forum.example.com and need help with CNAME entries. Additionally, they are experiencing an error message indicating that port 443 is already in use.

aaronk discovers that the httpd is running on port 443 for the website example.com, and wants to know which port to use for the Discourse instance running on the subdomain forum.example.com.

itsbhanusharma suggests following a guide to set up Discourse alongside Apache2, as the issue is likely due to the existing Apache configuration. The guide can be found here.

I use a virtual server from Host Europe. I have some question about the DNS and the smtp settings.

Here the DNS settings:

Hostname                  Record       IP Address
forum.example.com         A            178.77.99.191

Do I need a CNAME entry? If yes which is the right entry?

I added an email account postmaster@example.com for the 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 

After the start of Discourse I get the error message that the port 443 is already in use. Yes it is true. How to fix this problem?

Port 443 already in use could happen due to a number of reasons including another webserver already running on your server.

You can check if that’s the case by this command:

netstat -alpn | grep 443

The httpd is running on 443. This is the website example.com. The forum should run in a subdomain forum.example.com. Which Port I have to use?

Here is the output of 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   -

You’ll have to follow this guide to set up discourse alongside apache2.