Bug #53
已結束Feature #51: 架設moodle作為課程系統
Install Moodle inside subdomain(moodle.localhost)
概述
Currently
https://localhost --> D:\Code\Web\hoosk_beasincere
https://moodle.localhost --> did not redirect but --> D:\Code\Web\hoosk_beasincere\ 且憑證無效(?)
http://localhost --> redirect to http://moodle.localhost --> D:\Code\Web\hoosk_beasincere\moodle
http://moodle.localhost --> D:\Code\Web\hoosk_beasincere\moodle
SC 是由 Sashiba Chou 於 超過 4 年 前更新
h2. 參考文件/網站
https://kingweblife.blogspot.com/2016/07/xamppvirtualhostwordpress-opencart.html
- C:\Windows\System32\drivers\etc\hosts
Add
127.0.0.1 moodle.localhost
-
D:\installed\xampp\apache\conf\httpd.conf
-
D:\installed\xampp\apache\conf\extra\httpd-vhosts.conf
Add
##----------------------以下sashiba---------------------
NameVirtualHost *:80
DocumentRoot "D://Code/Web/hoosk_beasincere"
ServerName localhost
ServerAlias localhost
DocumentRoot "D://Code/Web/hoosk_beasincere/moodle"
ServerName moodle.localhost
ServerAlias moodle.localhost
##----------------------以上sashiba---------------------
SC 是由 Sashiba Chou 於 超過 4 年 前更新
After above modifications...
(V) https://localhost --> D:\Code\Web\hoosk_beasincere
(X) https://moodle.localhost --> did not redirect but --> D:\Code\Web\hoosk_beasincere\ 且憑證無效(?)
(V) http://localhost --> D:\Code\Web\hoosk_beasincere\moodle
(V) http://moodle.localhost --> D:\Code\Web\hoosk_beasincere\moodle
SC 是由 Sashiba Chou 於 超過 4 年 前更新
h2. 參考文件/網站
https://www.brilliantcode.net/348/apache-2-4-multi-domain-ssl-https/
- D:\installed\xampp\apache\conf\httpd-ssl.conf
Add
NameVirtualHost *:443
DocumentRoot "D://Code/Web/hoosk_beasincere/moodle"
ServerName moodle.localhost
SSLEngine on
SSLCertificateKeyFile "conf/ssl.key/server.key"
SSLCertificateFile "conf/ssl.crt/server.crt"
SC 是由 Sashiba Chou 於 超過 4 年 前更新
- 狀態 從 New 變更為 Closed
Enable HTTPS on moodle
參考文件
https://docs.moodle.org/310/en/Transitioning_to_HTTPS#Steps
Edit config.php in moodle
from
$CFG->wwwroot = 'http://moodle.localhost';
to
$CFG->wwwroot = 'https://moodle.localhost';