V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
librae
V2EX  ›  分享发现

最近弄了个 DigitalOcean 的 VPS 玩,照葫芦画瓢搭了个简单的 nginx server 和 discourse 论坛。 有需要的同学可以参考我的笔记。顺带一个 DO 的邀请码 :)

  •  
  •   librae · 2014-08-05 00:00:23 +08:00 · 4848 次点击
    这是一个创建于 3557 天前的主题,其中的信息可能已经有所发展或是发生改变。
    笔记链接: http://librae.github.io/work-notes/WebDevelopment.html
    邀请码链接: https://www.digitalocean.com/?refcode=2e28a792021d

    笔记摘要:

    Deploy An Nginx Server
    ======================

    Refer to official site:
    http://wiki.nginx.org/Install

    Brief:
    apt-get install nginx

    To control: nginx -s [ stop | quit | reopen | reload ]

    Configuration files are placed in /etc/nginx/:
    sites-enabled/ and conf.d/* will be included in nginx.conf
    And sites-available/ is used for customization, linked as symbol into sites-enabled/.

    1. Basic http server example
    2. Basic forward proxy example

    Deploy A Docker for Discourse on DO
    ===================================

    Refer to official tutorial:
    https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md
    To use it along with Nginx, we need below extra steps since default 80 port is occupied already:
    1. Modify /var/docker/containers/app.yml
    ## which TCP/IP ports should this container expose?
    expose:
    - "4578:80" # fwd host port 4578 to container port 80 (http)
    - "2222:22" # fwd host port 2222 to container port 22 (ssh)
    2. Add a conf for Nginx to tell him to forward specific request to port 4578.
    16 条回复    2014-08-09 10:49:11 +08:00
    shindo10
        1
    shindo10  
       2014-08-05 00:02:43 +08:00
    do哪个节点哦?速度如何?
    librae
        2
    librae  
    OP
       2014-08-05 00:06:19 +08:00
    新加坡,以前由于稳定性而受人诟病,不过目前用起来感觉还行。
    可以 ping 一下这个域名试试 accrete.org
    xmbaozi
        3
    xmbaozi  
       2014-08-05 00:12:42 +08:00
    @librae accrete.org
    请问这个网站是用什么程序,看起来挺不错的
    librae
        4
    librae  
    OP
       2014-08-05 00:21:15 +08:00   ❤️ 1
    @xmbaozi 其实只是一个静态页面而已。是用的yahoo那个pure的css框架。
    可以参考这里: http://purecss.io
    hjc4869
        5
    hjc4869  
       2014-08-05 01:30:43 +08:00
    discourse我一个月前折腾过,两天前关闭,没什么人。
    我是在linode日本上搞的。
    stevegy
        6
    stevegy  
       2014-08-05 06:16:07 +08:00   ❤️ 1
    Ping statistics for 128.199.232.247:
    Packets: Sent = 19, Received = 8, Lost = 11 (57% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 90ms, Maximum = 106ms, Average = 96ms
    wwqgtxx
        7
    wwqgtxx  
       2014-08-05 07:24:16 +08:00 via Android
    @librae 打开好慢
    librae
        8
    librae  
    OP
       2014-08-05 08:47:36 +08:00
    @wwqgtxx 现在应该正常了 :)
    linfox
        9
    linfox  
       2014-08-05 09:40:04 +08:00
    速度很不错哦。 105ms

    我旧金山的节点 250 ms
    librae
        10
    librae  
    OP
       2014-08-05 10:09:43 +08:00
    @linfox 是的,又搭了一个vpn。比之前付费的vpn稳定快速。
    看来新加坡机房还是很让人期待的。
    linfox
        11
    linfox  
       2014-08-05 10:31:41 +08:00
    @librae

    我也一直想自己搭 vpn。
    可以指点下吗?

    是不是用shadowsocks ?
    librae
        12
    librae  
    OP
       2014-08-05 11:07:39 +08:00
    @linfox 直接用的pptpd
    ubuntu 的话apt-get装就行了,配置较简单,教程有很多。比如这个https://help.ubuntu.com/community/PPTPServer
    wwqgtxx
        13
    wwqgtxx  
       2014-08-05 17:25:21 +08:00 via Android
    @librae 是的,好快,之前怎么了?
    librae
        14
    librae  
    OP
       2014-08-05 20:14:17 +08:00
    @wwqgtxx 也许是机房的原因吧,SSD同步不了了,物理断电了重启好的。
    weyou
        15
    weyou  
       2014-08-07 01:14:21 +08:00
    各位有没有发现上海电信这几天访问DO新加坡机房特别慢?
    Ping了一下掉包率很高
    zhuzhenyu
        16
    zhuzhenyu  
       2014-08-09 10:49:11 +08:00
    这是我搭建vpn时候的记录,对了你可以使用我发布的账号链接给你下。:vpn.zhuzhenyu.net
    http://blog.zhuzhenyu.net/vps/centos6-5-vpn-pptpd.html
    Do旧金山的路线现在太烂了。我的blog就是旧金山的,准备切换走了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2399 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 15:05 · PVG 23:05 · LAX 08:05 · JFK 11:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.