简体   繁体   English

为项目打开中使用的 aolserver 创建要使用的 url,而不是 ip 地址

[英]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:需要几个步骤:

  1. In your Internet router, you will need to open a port (80 or 8000).在您的 Internet 路由器中,您需要打开一个端口(80 或 8000)。

  2. 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.请检查您的路由器。

  3. 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 路由器)的情况下进行更改。

  4. 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=20110201http://blog.gmane.org/gmane.comp.web.aolserver/month=20110201

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用于通信2个Docker容器的IP地址是什么? - What is the ip address used to communicate 2 docker containers? Android:使用已解析的IP地址而不是主机名 - Android: Using resolved IP Address instead of hostname 如果url为“ localhost”,Axio请求返回网络错误,如果仅在VPS(数字海洋)上使用IP地址,可以吗? - Axio Request return Network error if url 'localhost" and okay if use IP Address on VPS only(digital ocean)? 如何将ip地址和portnumber作为url传递 - how to pass ip address and portnumber as url 如何获取访问者的实际 ip 地址而不是他的公共 ip 地址? - How do I get the actual ip address of the visitor instead of his public ip address? 如何在IP地址而不是localhost上托管Web应用程序 - How to host web application on IP address instead of localhost 如何将带有 IP 地址的 HTTP URL 重定向到带有域名的 HTTPS URL? - How to redirect HTTP URL with IP address to HTTPS URL with domain name? 我网页上的链接指向127.0.0.1域,而不是服务器IP地址 - Links on my webpage point to 127.0.0.1 domain instead of servers ip address URL路径中的资源是否有自己的IP地址? - Do resources in a URL path have their own IP address? 在C / C ++中,如何确定URL是否是IP地址? - How to determine if a URL is an IP Address in C/C++?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM