› NGINX
› NGINX Trac
› 3rd Party Modules
› Security Advisories
› CHANGES
› OpenResty
› ngx_lua
› Tengine
在线学习资源
› NGINX 开发从入门到精通
NGINX Modules
› ngx_echo
silvernoo
V2EX  ›  NGINX

在树莓派上怎样用一个 ip 配置两个网站?

  •  
  •   silvernoo ·
    silvernoo · Sep 13, 2014 · 5265 views
    This topic created in 4442 days ago, the information mentioned may be changed or developed.
    比如pi的的ip是192.168.1.200

    想放一个静态网站。

    另外放一个uwsgi的网站,代理一个本机端口。
    11 replies  •  2014-10-15 01:47:36 +08:00
    hzqim
    hzqim
    Sep 13, 2014
    1
    1,用不同域名分别绑定。
    2,不想用域名,就采用不同端口绑定。
    silvernoo
    silvernoo
    OP
    Sep 13, 2014
    2
    @hzqim 内网有什么办法用域名吗?

    端口绑定是怎样的思路。能举个例子吗
    silvernoo
    silvernoo
    OP
    Sep 13, 2014
    3
    端口绑定配好了。谢谢
    yanyuechuixue
    yanyuechuixue
    Sep 13, 2014 via Android
    4
    用nginx办不到么?
    ZMOM1031
    ZMOM1031
    Sep 13, 2014
    5
    配置Web虚拟主机,内网用bind做一个DNS解析服务器,把自己的域名配置进去,其他解析丢给运营商的DNS服务器
    lazycat
    lazycat
    Sep 13, 2014 via Android
    6
    dns直接解析内网IP就可以了
    ygmpkk
    ygmpkk
    Sep 13, 2014
    7
    有两种办法,一种是域名绑定,一种是端口区分
    wanwangkangluo1
    wanwangkangluo1
    Sep 13, 2014
    8
    nginx port domain proxy
    orvice
    orvice
    Sep 13, 2014
    9
    @silvernoo
    server
    {
    listen 80;

    }

    server
    {
    listen 81;

    }
    dawncold
    dawncold
    Sep 13, 2014
    10
    不能给一个interface加俩ip么?好像ip alias这种技术能做到
    ryd994
    ryd994
    Oct 15, 2014
    11
    @dawncold 不能,但是可以一个物理设备开多个interface

    @silvernoo 域名什么的,如果用的人少,可以hosts解决
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   930 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 19:31 · PVG 03:31 · LAX 11:31 · JFK 14:31
    ♥ Do have faith in what you're doing.