在网络上设置多个网络服务器
setup multiple webservers on network
我有 2 个网络服务器(windows 和 linux(ubuntu))
我正在使用静态 IP,并使用默认网络服务器 (windows) 端口 80 指向我的所有站点
我刚刚为某些站点设置了一个 linux 服务器,但需要知道如何将特定域路由到端口 8080 上的特定服务器
我目前有这个工作
http://judsonlinux.dyndns.org:8080/
但我再次需要知道如何将特定域指向此。我已经阅读了一些关于在 windows 服务器上使用反向代理的内容。这是要走的路吗?
谢谢
更新:我重写了工作,但由于某种原因它没有拉起该网站。它会转到默认的 apache 服务器页面。
这是我的配置...
public 文件夹中有一个索引页
您可以为域编写重写规则。
例如:在 apache 中
RewriteCond %{HTTP_HOST} ^(www\.)?domain1.org$ [NC]
RewriteRule ^(.*)$ http://judsonlinux.dyndns.org:8080/ [P,L]
例如:IIS
<rewrite>
<rules>
<rule name="Fail bad requests">
<match url=".*"/>
<conditions>
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="AbortRequest" />
</rule>
<rule name="Redirect from blog">
<match url="^domain/([_0-9a-z-]+)/([0-9]+)" />
<action type="Redirect" url="www.d.com:8080/{R:2}/{R:1}" redirectType="Found" />
</rule>
<rule name="Rewrite to article.aspx">
<match url="^article/([0-9]+)/([_0-9a-z-]+)" />
<action type="Rewrite" url="article.aspx:8080?id={R:1}&title={R:2}" />
</rule>
</rules>
</rewrite>
设置 linux 服务器后,我必须将 linux 上的默认端口更改为 8080,然后将其添加到 windows 中的主服务器 (80) 上。现在可以了。 windows 上 IIS 中的一个网站。然后使用 URL 重写规则如下。
我有 2 个网络服务器(windows 和 linux(ubuntu))
我正在使用静态 IP,并使用默认网络服务器 (windows) 端口 80 指向我的所有站点
我刚刚为某些站点设置了一个 linux 服务器,但需要知道如何将特定域路由到端口 8080 上的特定服务器
我目前有这个工作 http://judsonlinux.dyndns.org:8080/
但我再次需要知道如何将特定域指向此。我已经阅读了一些关于在 windows 服务器上使用反向代理的内容。这是要走的路吗?
谢谢
更新:我重写了工作,但由于某种原因它没有拉起该网站。它会转到默认的 apache 服务器页面。
这是我的配置...
public 文件夹中有一个索引页
您可以为域编写重写规则。
例如:在 apache 中
RewriteCond %{HTTP_HOST} ^(www\.)?domain1.org$ [NC]
RewriteRule ^(.*)$ http://judsonlinux.dyndns.org:8080/ [P,L]
例如:IIS
<rewrite>
<rules>
<rule name="Fail bad requests">
<match url=".*"/>
<conditions>
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="AbortRequest" />
</rule>
<rule name="Redirect from blog">
<match url="^domain/([_0-9a-z-]+)/([0-9]+)" />
<action type="Redirect" url="www.d.com:8080/{R:2}/{R:1}" redirectType="Found" />
</rule>
<rule name="Rewrite to article.aspx">
<match url="^article/([0-9]+)/([_0-9a-z-]+)" />
<action type="Rewrite" url="article.aspx:8080?id={R:1}&title={R:2}" />
</rule>
</rules>
</rewrite>
设置 linux 服务器后,我必须将 linux 上的默认端口更改为 8080,然后将其添加到 windows 中的主服务器 (80) 上。现在可以了。 windows 上 IIS 中的一个网站。然后使用 URL 重写规则如下。