bitnami CentOS Redmine -2
続き
linux版 bitnami apache httpd.conf
httpd.conf
/opt/redmine/apache2/conf/bitnami/bitnami.conf
ルート、中間等はここで設定
httpアクセスを https へリダイレクト
vi /opt/redmine/apache2/conf/bitnami/bitnami.conf
< VirtualHost _default_:80>
#赤字を追記
DocumentRoot "/opt/redmine/apache2/htdocs"
ServerName www.exmanple.com:80
RewriteEngine on
RewriteCond %{HTTP_HOST} ^wwwc\.example.com
RewriteRule ^/(.*)$ https://www.example.com/$1 [R=301,L]
<VirtualHost _default_:443>
DocumentRoot "/opt/redmine/apache2/htdocs"
SSLEngine on
SSLProtocol all -SSLv2
bitnami 版 apacheログファイルの場所編集
cd /opt/redmine/apache2/conf
vi httpd.conf
ErrorLog "/var/log/httpd_error_log"
CustomLog "/var/log/httpd_access_log" common
ServerAdmin hoge@hoge.com
ServerName www.example.com:80
apache 再起動
#apache のみ停止
#sudo /opt/redmine/ctlscript.sh stop apache
#apache のみ起動
#sudo /opt/redmine/ctlscript.sh start apache
#apache のみ再起動
#sudo /opt/redmine/ctlscript.sh restart apache
apacheサービス登録
vi /etc/systemd/system/bitnami-redmine.service
[Unit]
Description=run bitnami redmine
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/opt/redmine/ctlscript.sh start
ExecStop=/opt/redmine/ctlscript.sh stop
[Install]
WantedBy=multi-user.target
redmine メールサーバ設定