Ubuntu 22.04.03에서 Redmine 5.0 구성하기 [ 5 ] - 최종 구성확인

2025. 3. 19. 17:08·Redmine
반응형

이번 섹션은 "Redmine의 최종 구성확인"에 대해서 입니다.

Redmine 설치를 점검하기 위해 `webrick`을 실행하여 `webrick`이 직접 Redmine을 제공할 수 있는지 확인하겠습니다. 단, `webrick`은 운영 서버(Production Server)에서 사용하지 않아야 합니다.

$ bundle exec rails server -u webrick -e production  
=> Booting WEBrick  
=> Rails 6.1.6.1 application starting in production http://0.0.0.0:3000  
=> Run `bin/rails server –help` for more startup options  
[2022-07-24 20:32:36] INFO WEBrick 1.7.0  
[2022-07-24 20:32:36] INFO ruby 3.0.2 (2021-07-07) [x86_64-linux-gnu]  
[2022-07-24 20:32:36] INFO WEBrick::HTTPServer#start: pid=8288 port=3000

Redmine 위키에서는 `-u` 옵션을 생략하고 있지만, `koromicha`는 이를 포함하고 있습니다. `-u` 옵션은 `webrick`이 정상적으로 작동하도록 하는 데 필요합니다.

이 시점에서 포트 3000이 열려 있다면, 브라우저에서 사이트의 포트 3000으로 접속하여 Redmine이 정상적으로 작동하는지 확인할 수 있어야 합니다.

작업이 끝나면 `CTRL-C`를 눌러 `webrick` 서버를 종료하세요.

위에서 설명한 대로 모든 것이 정상적으로 작동한다면, 이제 Apache 구성을 수정하여 Redmine을 제공하도록 설정할 수 있습니다.

Redmine 계정에서 로그아웃한 후 관리자 계정으로 로그인하세요.

관리자 계정에서 이전에 생성한 `/etc/apache2/sites-available/your-site-domain.conf` 파일과, `certbot`에 의해 생성된 `your-site-domain-ssl.conf` 파일을 수정하세요.

파일을 수정하여 테스트 페이지 대신 Redmine 설치를 가리키도록 설정하세요.

$ sudo sed -i ‘s|/home/redmine/live/test|/home/redmine/live/redmine-5.0/public|’ /etc/apache2/sites-available/redmine-support.com*

`/etc/apache2/sites-available/redmine-support.com.conf` 파일을 열어보면 다음과 같은 내용이 표시되어야 합니다.

<VirtualHost *:80>
    ServerName '<my-site-domain>'
    ServerAlias www.'<my-site-domain>'
    DocumentRoot /home/redmine/live/redmine-5.0/public
    ServerAdmin '<website-administer-email-address>'

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    RewriteEngine on
    RewriteCond %{SERVER_NAME} =www.redmine.inesonic.com [OR]
    RewriteCond %{SERVER_NAME} =redmine.inesonic.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<Directory “/home/redmine/live/redmine-5.0/public”>
    Allow from all
    Require all granted
</Directory>

마찬가지로, `certbot`에 의해 생성된 `/etc/apache2/sites-available/my-site-domain-le-ssl.conf` 파일을 확인하면 다음과 같은 내용이 표시되어야 합니다.

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName '<my-site-domain>'
        ServerAlias www.'<my-site-domain>'
        DocumentRoot /home/redmine/live/redmine-5.0/public

        ServerAdmin '<website-administer-email-address>'

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /etc/letsencrypt/live/'<my-site-domain>'/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/'<my-site-domain>'/privkey.pem
    </VirtualHost>
</IfModule>

제가 사용한 구성 파일의 내용입니다.

<VirtualHost *:80>
    ServerName redmine-support.com
    ServerAlias www.redmine-support.com
    DocumentRoot /home/redmine/live/redmine-5.0/public


    ServerAdmin jengdobby@test.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    RewriteEngine on
    RewriteCond %{SERVER_NAME} =www.redmine-support.com [OR]
    RewriteCond %{SERVER_NAME} =redmine-support.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName redmine-support.com
        ServerAlias www.redmine-support.com
        DocumentRoot /home/redmine/live/redmine-5.0/public

        ServerAdmin jengdobby@test.com

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/redmine-support.com/STAR_uniquify_com.crt
        SSLCertificateKeyFile /etc/letsencrypt/live/redmine-support.com/STAR_uniquify_com.key

        <Directory "/home/redmine/live/redmine-5.0/public">
            Allow from all
            Require all granted
        </Directory>
    </VirtualHost>
</IfModule>

이 시점에서 남은 작업은 Apache의 구성을 다시 로드하는 것입니다.

$ systemctl reload apache2

이제 브라우저에서 Redmine 서버로 접속할 수 있어야 합니다.

반응형

'Redmine' 카테고리의 다른 글

Redmine에서 프로젝트 생성 시 'Public' 옵션 숨기는 방법  (0) 2025.03.24
Redmine에서 이메일 알림 활성화 설정 방법  (0) 2025.03.19
Ubuntu 22.04.03에서 Redmine 5.0 구성하기 [ 4 ] - Redmine 설치  (0) 2025.03.19
Ubuntu 22.04.03에서 Redmine 5.0 구성하기 [ 3 ] - MySQL 설정  (0) 2025.03.19
Ubuntu 22.04.03에서 Redmine 5.0 구성하기 [ 2 ] - Apache2 구성  (0) 2025.03.19
'Redmine' 카테고리의 다른 글
  • Redmine에서 프로젝트 생성 시 'Public' 옵션 숨기는 방법
  • Redmine에서 이메일 알림 활성화 설정 방법
  • Ubuntu 22.04.03에서 Redmine 5.0 구성하기 [ 4 ] - Redmine 설치
  • Ubuntu 22.04.03에서 Redmine 5.0 구성하기 [ 3 ] - MySQL 설정
정도비_
정도비_
jeongdobby90 님의 블로그 입니다.
  • 정도비_
    정도비 노트북
    정도비_
  • 전체
    오늘
    어제
    • 분류 전체보기 (18)
      • Git (1)
      • GitHub Blog (0)
      • Ubuntu (1)
      • Redmine (9)
      • Docker (7)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    Git
  • 최근 댓글

  • 최근 글

  • 반응형
  • hELLO· Designed By정상우.v4.10.3
정도비_
Ubuntu 22.04.03에서 Redmine 5.0 구성하기 [ 5 ] - 최종 구성확인
상단으로

티스토리툴바