[英]How to create a blog.domainname.com on digitalocean instead of the blog being hosted on the domainname.com
I'm hosting my blog on digital ocean and I want to set up a home page with a blog.domainame.com to access my blog, I must be googling the incorrect stuff as I cannot find any resources on this. 我在数字海洋上托管我的博客,并且我想用blog.domainame.com设置一个主页来访问我的博客,我必须使用不正确的内容进行搜索,因为我无法在此找到任何资源。
I'm using nginx to host my blog with Ghost on digitalocean, any help or guidance appreciated. 我正在使用nginx在Digitalocean上与Ghost托管我的博客,感谢任何帮助或指导。
There are several steps but it's like create a duplicate website in fact. 有几个步骤,但实际上就像创建一个重复的网站。
You will need to update your site configuration 您将需要更新站点配置
sudo touch /etc/nginx/sites-available/second-domain
And create a symlink to this configuration 并为此配置创建符号链接
sudo ln -s /etc/nginx/sites-available/second-domain /etc/nginx/sites-enabled/second-domain
Next you must create a new folder in /var/www/, it will be the folder of your second domain. 接下来,您必须在/ var / www /中创建一个新文件夹,它将是第二个域的文件夹。 Update the config.js to match your second domain name and change the port.
更新config.js以匹配您的第二个域名并更改端口。
The last step is to create a new system service. 最后一步是创建一个新的系统服务。
vim /etc/systemd/system/secondsite.service
This solution work with a custom installation of Ghost on Ubuntu. 此解决方案可在Ubuntu上自定义安装Ghost。
I write an article which combine all the information and more details if you want to serve several Ghost blogs in one droplet. 如果您想在一站式服务几个Ghost博客,我写了一篇结合了所有信息和更多细节的文章。 You will find all the step from scratch in case you don't have the same configuration.
如果您没有相同的配置,您将从头开始找到所有步骤。
Install multiple Ghost CMS on DigitalOcean 在DigitalOcean上安装多个Ghost CMS
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.