sudo npm install -g hexo-cli
npm install
hexo server
Open http://127.0.0.1:4000/admin
hexo generate
First create an nginx configuration, assuming
code is cloned as /usr/share/nginx/ucoder.ir
server {
listen 80;
server_name ucoder.ir;
server_name www.ucoder.ir;
root /usr/share/nginx/ucoder.ir/public;
}
Now install certbot to enable SSL
yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
sudo yum install certbot-nginx
Enable CertBot on our Nginx Configuration
sudo certbot --nginx
OR IF YOU RUN INTO BUG PROBLEM
sudo certbot --authenticator standalone --installer nginx --pre-hook "systemctl stop nginx" --post-hook "systemctl stop nginx"
Test if renewal procedure succeeds
sudo certbot renew --dry-run
Enable CronTab job to renew our certificates automatically
sudo crontab -e
0 0,12 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew
setsebool -P httpd_read_user_content 1