[英]creating url to use instead of ip address for aolserver used in project open
In Project-Open tool, aolserver is used to host the application and is accessed using the ip address of the server like 172.XX.XX.XX:8000.在 Project-Open 工具中,aolserver 用于托管应用程序,并使用服务器的 ip 地址访问,如 172.XX.XX.XX:8000。 Now I don't want to make this ip address public.现在我不想公开这个IP地址。 I tried to create and use url (by making some changes in the config.tcl ) for this but couldn't do so.我尝试为此创建和使用 url(通过在 config.tcl 中进行一些更改),但无法这样做。
Please let me know if my question is not clear enough.如果我的问题不够清楚,请告诉我。
thanks in advance!!!提前致谢!!!
Well, your question isn't totally clear, but I think what you want is for your website to appear on a URL, such as www.example.com.好吧,您的问题并不完全清楚,但我认为您想要的是让您的网站出现在 URL 上,例如 www.example.com。 To do this with AOLserver, you need to edit the /web/server/etc/config.tcl file and edit this line (changing www.example.com to whatever URL you want).要使用 AOLserver 执行此操作,您需要编辑 /web/server/etc/config.tcl 文件并编辑此行(将 www.example.com 更改为您想要的任何 URL)。
set hostname www.example.com
Then restart AOLserver.然后重新启动 AOL 服务器。 You might also want to set the port to 80. This requires root access, and you may also need to pass -b to AOLserver in your startup script.您可能还想将端口设置为 80。这需要 root 访问权限,并且您可能还需要在启动脚本中将 -b 传递给 AOLserver。
I understand you are running ]project-open[ on a local server on port 8000 and you want to make this service visible to the Internet, right?我知道您正在本地服务器上的端口 8000 上运行 ]project-open[ 并且您想让该服务对 Internet 可见,对吗? There are several steps required:需要几个步骤:
In your Internet router, you will need to open a port (80 or 8000).在您的 Internet 路由器中,您需要打开一个端口(80 或 8000)。
You need to forward incoming traffic on your router to the ]project-open[ server.您需要将路由器上的传入流量转发到 ]project-open[ 服务器。 You can do this using a forwarding rule or similar.您可以使用转发规则或类似规则执行此操作。 Please check your router.请检查您的路由器。
You probably want to setup a URL using DynDns, Dynu or other DNS providers pointing to your Internet router, and changing in case your router's IP is also changing (SOHO router).您可能想使用 DynDns、Dynu 或其他 DNS 提供商设置一个指向您的 Internet 路由器的 URL,并在路由器的 IP 也发生变化(SOHO 路由器)的情况下进行更改。
In ]po[ you will need to set the redirection URL accordingly.在 ]po[ 中,您需要相应地设置重定向 URL。 Depending on the port, you may want to set Admin -> Parameters -> "SuppressHTTPPort" to 1根据端口,您可能需要将 Admin -> Parameters -> "SuppressHTTPPort" 设置为 1
Which OS will you be using to access this server?您将使用哪个操作系统来访问此服务器? If you will be using a LInux machine you would put the host name into your /etc/host file with the desired name:如果您将使用 LInux 机器,您可以将主机名放入具有所需名称的 /etc/host 文件中:
For example:例如:
/etc/hosts: /etc/hosts:
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.23.108 myprojecturl
The line 192.168.23.108 will provide for you to use myprojecturl to access the site rather than the ip number 192.168.23.108 (from that machine). 192.168.23.108 行将允许您使用 myprojecturl 来访问该站点,而不是使用 IP 号 192.168.23.108(来自该机器)。
From a Windows machine you could do the same.在 Windows 机器上,您也可以这样做。 The host file is located in a different plaice ().主机文件位于不同的位置 ()。
c:\\windows\\system32\\drivers\\etc\\hosts: c:\\windows\\system32\\drivers\\etc\\hosts:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
192.168.23.108 myprojecturl
The last line is an example of what you would add to make "myprojecturl" the host name for pulling up the site instead of having to remember the ip numbers to type in.最后一行是一个示例,说明您将添加什么内容以使“myprojecturl”成为用于拉起站点的主机名,而不必记住要输入的 IP 号。
If you're trying to make generated urls be different from the where the server is listening, you need to set the location
parameter in the nssock configuration.如果您试图使生成的 url 与服务器正在侦听的location
不同,则需要在 nssock 配置中设置location
参数。
in the config fie is a section like this:在配置文件中是这样的部分:
ns_section ns/server/${server}/module/nssock
ns_param timeout 120
ns_param address $address
ns_param hostname $hostname
ns_param port $httpport
Add in添加
ns_param location http://my.host.com/
see http://blog.gmane.org/gmane.comp.web.aolserver/month=20110201见http://blog.gmane.org/gmane.comp.web.aolserver/month=20110201
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.