Ruinan MA,Haochen Jiang,Will Luo
我們使用SSH登錄到我們的服務器,因此請下載grader_key (私鑰)並使用以下命令登錄到服務器(替換路徑):
ssh -i /path/to/private_key/grader_key [email protected]
我們建議您將私鑰保存到您的.ssh目錄或其他隱藏目錄。如果它提示您繼續連接,請鍵入yes 。
注意:如果您看到一個錯誤消息,例如“警告:未受保護的私鑰文件!” ,請輸入命令:(更換路徑)
chmod 600 /path/to/private_key/grader_key
然後,您應該登錄好。如果仍然有要登錄的問題,請聯繫[email protected]。
sudo密碼是cse135grader 。
主頁:https://cse135.monster/
Ruinan的頁面:https://cse135.monster/members/ruinan/
Haochen的頁面:https://cse135.monster/members/haochen/
Will的頁面:https://cse135.monster/members/will_luo/
robots.txt:https://cse135.monster/robots.txt
hw1/hello.php:https://cse135.monster/hw1/hello.php
hw1/report.html:https://cse135.monster/hw1/report.html
MATOMO Analytics(額外信用):https://cse135.monster/matomo/
deploy.sh ,它只是執行git pull 。webhook_server.py ,該程序會在有新的推送時偵聽8080端口並運行腳本。Payload URL設置為https://134.209.213.47:8080 。 Content type為application/json 。nohup python3 webhook_server.py > ~/output.log 2>&1 & ,我們可以在後端運行Python程序,然後檢查日誌。在那裡,我們可以成功部署網站。注意: opt找到deploy.sh和webhook_server.py的源代碼。 用戶名: grader 。密碼: Cse135Grader
我們看到,當HTML文件從服務器運輸時,它們會被壓縮,因此內容編碼的標頭顯示其gzip 。但是,在客戶端接收到文件後,內容不會更改。
我們沿著這裡的教程遵循。首先,安裝apache mod_security模塊。
$ sudo apt install libapache2-mod-security2
$ sudo a2enmod security2
然後,在/etc/apache2/apache2.conf中添加兩行:
ServerTokens Full
SecServerSignature "CSE 135 Server"
最後重新啟動Web服務器。
sudo systemctl restart apache2
關聯
MATOMO帳戶和密碼:請參閱我們提交的matomo.txt 。
首先,安裝必要的依賴項。
sudo apt update
sudo apt upgrade
sudo apt install -y mysql-server php libapache2-mod-php php-mysql php-cli php-curl php-gd php-mbstring php-xml php-zip
然後,我們為matomo創建了一個mySQL用戶:
sudo mysql -u root -p
CREATE DATABASE matomo;
CREATE USER 'matomo'@'localhost' IDENTIFIED BY 'some_password';
GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'localhost';
FLUSH PRIVILEGES;
EXIT;
然後,安裝matomo :
cd /tmp
wget https://builds.matomo.org/matomo-latest.zip
unzip matomo-latest.zip
sudo mv matomo/* /var/www/cse135.monster/public_html/
重新加載服務器:
sudo systemctl reload apache2
之後,將MATOMO安裝到我們的服務器上。我們可以訪問http://cse135.monster/matomo遵循該指南並最終進行設置。