2020年9月29日 星期二

Solved: Can not use DNS name to link to my NAS within a local LAN

 I use Ubuntu 20.04 at home within a local network the same as a Synology NAS.

Every goes fine except I can not use DNS name to link to my NAS.

I solved the problem by the following:

Solution:

edit the file /etc/hosts

add a line: 

192.168.0.x  xxx.myds.me

(The above local ip and DNS name should be those of your computer.)

 

2020年9月21日 星期一

如何讓 NAS 上的 Wordpress 站台可以寄出 email

剛安裝在 Synology NAS 上的 Wordpress 看起來都可以使用,但是當我們使用某些功能時,需要由這個 Wordpress 處理 email。例如,在網頁上使用聯絡表單時,必須將留言的朋友的訊息,轉到 網站管理者的 email 信箱裡。

在此提供一個已測試成功的方法,這裡示範如何使用 gmail 來處理 Wordpress 網頁的信。

方法:

1. 首先,要安裝一個叫 WP Mail SMTP 的 plugin。

2. 接下來,有點小複雜,重點是要與 Google 帳戶取得彼此信任的 API 認證,才可以在網站上使用 gmail 的功能。步驟請依照這個網站的介紹。

https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/

經過了一番設定,Wordpress 站台終於可以寄信了。

如何讓 Wordpress 的登入畫面強制使用 https

為了登入的安全性,如果要強制把登入WordPress 網站管理介面使用SSL/HTTPS,可以編輯 wp-config.php 檔案,加入以下設定。

define('FORCE_SSL_ADMIN', true);