오랜만에 새롭게 포럼 사이트가 필요한 일이 있어서 digitalocean에 새롭게 설치했습니다. 다른 분들은 삽질하지 마시라고 부딪혔던 문제에 해대서 간단히 적어봅니다.
- digitalocean에 30분만에 설치하기 공식 가이드 : https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md
- 이메일은 aws ses를 썼습니다. 여기서 주의할 점은 aws ses는 인증된 도메인으로만 이메일 발송 주소를 할 수 있습니다. ses의 기본 도메인 인증 절차를 다 밟는 것 이외에 discourse의 app.yml에서 메일 발송 주소를 수정해야합니다. 수정하지 않으면
[email protected]
주소로 발송시도하기에 aws ses가 이를 거절하게되어 이메일을 받을 수 없어 설정을 할 수 없습니다. 아래에서 가운데줄 주석을 제거하고 발송이메일을 원하는 이메일로 적습니다.
## If you want to set the 'From' email address for your first registration, uncomment and change:
#- exec: rails r "SiteSetting.notification_email='[email protected]'"
## After getting the first signup email, re-comment the line. It only needs to run once.
- discourse를 ningx 뒤에 두어 ssl 적용하기 : https://www.digitalocean.com/community/tutorials/how-to-install-discourse-behind-nginx-on-ubuntu-14-04
- 이 가이드에서는 nignx 설정파일에 문제가 있습니다. 아래 부분에서 맨 마지막 줄에 도메인 뒤에
/
를 추가해줘야합니다. 그렇지 않으면 http://yourdomain.comlogin 처럼 가운데/
가 빠진 상태로 리다이렉트 되는 문제가 있습니다.
- 이 가이드에서는 nignx 설정파일에 문제가 있습니다. 아래 부분에서 맨 마지막 줄에 도메인 뒤에
location / {
proxy_pass http://discourse.example.com:25654/;
proxy_read_timeout 90;
proxy_redirect http://discourse.example.com:25654/ https://discourse.example.com;
}