简体   繁体   English

如何在Digitalocean上创建Blog.domainname.com,而不是在domainname.com上托管博客

[英]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.

相关问题 如何用域名替换odoo地址 - How to replace odoo address with domainname nginx url重写mysite.com/blog => blog.mysite.com/blog - nginx url rewrite mysite.com/blog => blog.mysite.com/blog NGINX-将www.my-domain.com/blog/1234重定向到blog.my-domain.com/1234 - NGINX - redirect www.my-domain.com/blog/1234 to blog.my-domain.com/1234 Nginx将domain.com/blog/posts重定向到sub.domain.com/blog/posts - Nginx redirect domain.com/blog/posts to sub.domain.com/blog/posts nginx子域配置example.com/blog - nginx subdomain configuration example.com/blog Nginx; 使用blog.example.com访问example.com/blog - Nginx; use blog.example.com to access example.com/blog 如何使用Nginx和uwsgi在一个Django中运行多域名 - How to run multi domainname in one django with nginx and uwsgi 我想在我的 nginx 网站 (domain.com) 下发布我的 wordpress 网站 (blog.domain.com) 作为 domain.com/blog - I want to publish my wordpress website (blog.domain.com) under my nginx website (domain.com) as domain.com/blog 目前,wordpress是供example.com使用的,但我想使用nginx从example.com/blog提供该服务 - Currently, wordpress is served one example.com, but I want to serve it from example.com/blog with nginx 使用example.com/blog?p=1234将URL重定向到wordpress默认URL(example.com/blog/actual-url-of-post)在Safari中不起作用 - Redirect URL's with example.com/blog?p=1234 to wordpress default URL (example.com/blog/actual-url-of-post) doesn't work in Safari
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM