# DiscourseをDigital Oceanにインストールしましたが、nginxをインストールできません。

**URL:** <https://meta.discourse.org/t/installed-discource-on-digital-ocean-but-now-cannot-install-nginx/106361>\
**Category:** Self-hosting\
**Created:** [2019 年 1 月 12 日午後 4:24 UTC](https://meta.discourse.org/t/installed-discource-on-digital-ocean-but-now-cannot-install-nginx/106361 "2019-01-12T16:24:28Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![smlemk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/smlemk/32/65235_2.png) [@smlemk](https://meta.discourse.org/u/smlemk)\
**Post date:** [2019 年 1 月 12 日午後 9:03 UTC](https://meta.discourse.org/t/installed-discource-on-digital-ocean-but-now-cannot-install-nginx/106361/9 "2019-01-12T21:03:43Z")

</div>

Well, I actually got it working for [example.com](http://example.com), but going to [www.example.com](http://www.example.com) just redirects to my forum and not the homepage. I am assuming this has to do with my `root@forum:~# nano /etc/nginx/sites-enabled/example.com`? I can post my nginx config instead if that helps. At this point, you’re right. I should focus on learning command line better.

```
server {
    listen 80;
    listen [::]:80;

    root /var/www/EXAMPLE.com/html;
    index index.html index.htm index.nginx-debian.html;

    server_name EXAMPLE.com www.EXAMPLE.com;

    location / {
            try_files $uri $uri/ =404;
    }
}

```

But looking at the `server_name` portion confuses me because it looks like it should indeed work. This is getting out of the realm of discourse installation so no hard feelings if you don’t want to help.

---

_[View the full topic](https://meta.discourse.org/t/installed-discource-on-digital-ocean-but-now-cannot-install-nginx/106361)._
