2013年3月14日 星期四

Apache2 SSL and openssh and ufw for ubuntu

基本上參考這兩篇的作法就不會錯

How to Create a SSL Certificate on Apache for Ubuntu 12.04
Apache2 SSL in Ubuntu

不過在更改 VirtualHost 時, 應改為 <VirtualHost _default_:443>
否則會出現 ssl_error

安裝 openssh 只要下 apt-get install openssh-server 就可以了
修改 port 或 PermitRootLogin 等設定可以到 /etc/ssh/sshd_config

在安裝完以上兩個服務後, 可以開啟 ufw
sudo ufw enable
sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 443

UPDATE:
如果有外掛 x-sendfile 模組也要記得在 /etc/apache2/sites-available/default-ssl
加入

 XSendFile on
 XSendFilePath  /file-path


如果希望使用者必須使用ssl存取某個目錄也可以在 /etc/apache2/sites-available/default
加入 Redirect permanent /ssl-dir https://server.name/ssl-dir 的方式重新導向

沒有留言:

張貼留言

FPGA/STM32 SPI 實驗

本實驗中,Nucleo H753ZI 當作 SPI Master,PYNQ-Z2 當作 SPI Slave。 使用SPI通訊協定傳送及接收8 Bytes。 腳位設定如下: Nucleo H753ZI 功能 PYNZ-Z2 PD14 CS W9 PA5 SCLK...