Share Your Hexo Website within Local Network
After building our own website using Hexo, we can use the following command to preview the website on our own PC:
1 | hexo clean |
With the default setup, we can visit the website on http://localhost:4000
. However, if we want share the website with colleagues in the same local network without publishing the website, we need to open the port to the local domain. The commands are shown as below:
1 | # list all the port |
For Ubuntu 20.04, ufw
will manage all the connections and ports, however, for other Linux release versions, we can using iptables
as follows:
1 | # centos & redhat |