在Project中,aolserver用于承载应用程序,并使用服务器的ip地址(如172.XX.XX.XX:8000 )进行访问。现在我不想公开这个ip地址。我试图为此创建和使用url (通过在config.tcl中做一些更改),但做不到。
如果我的问题不够清楚,请告诉我。
提前谢谢!
发布于 2013-12-31 09:29:55
嗯,你的问题还不完全清楚,但我认为你想要的是你的网站出现在一个网址上,如www.example.com。要用AOLserver实现这一点,您需要编辑/web/server/etc/config.tcl文件并编辑这一行(将www.example.com更改为您想要的任何URL )。
set hostname www.example.com然后重新启动AOLserver。您还可能希望将端口设置为80。这需要根访问,您还可能需要在启动脚本中将-b传递给AOLserver。
发布于 2021-01-12 14:55:20
据我所知,您正在运行]项目-打开(在端口8000的本地服务器上,您希望使此服务在Internet上可见,对吗?)需要采取几个步骤:
发布于 2013-12-31 08:33:51
您将使用哪个操作系统访问此服务器?如果要使用LInux机器,则需要将主机名放入/etc/host文件中,并使用所需的名称:
例如:
/etc/东道国:
# 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行192.168.23.108将允许您使用myprojecturl访问站点,而不是ip号192.168.23.108 (从该机器)。
在Windows机器上,您也可以这样做。主机文件位于不同的plaice ()中。
C:\windows\system32 32\驱动程序\etc\主机:
# 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最后一行是一个示例,说明如何添加"myprojecturl“作为删除站点的主机名,而不必记住要输入的ip号。
https://stackoverflow.com/questions/20854097
复制相似问题