OK, this site runs as a Jekyll blog, so how do we do that?
First, we install Jekyll at the intended server, for Ubuntu:
Then, we add a designated user to run the blog:
After that, we export some necessary variables for the next step:
To complete the Jekyll installation, we install the necessary Ruby components. Be sure that you are user jekyll
and inside the /home/jekyll
directory:
Then, we create a new blog:
Finally, we have to create the service unit file as /lib/systemd/system/jekyll.service
:
where the start.sh
script reads as
For automated start on boot, we have to link this service under /etc/systemd/system/multi-user.target.wants
:
For now, we can start the service manually by sudo service jekyll start
.
For the proxy configuration to work, we want to be sure to have proxy functionality enabled:
So, our Jekyll blog server is at present running at port 4000 localhost.
To publish it, we have to amend the Apache configuration as follows.
/etc/apache2/sites-available/blog.example.com.conf
:
Now it’s time to restart the web server:
Then, given that certbot
is installed, run
in order to create a SSL-encrypted site.
That’s it! Now we have a Jekyll blog running SSL encrypted behind an Apache reverse proxy.
This post was updated 2023-11-19 to fix/clarify some service related details.