通过域名访问 阿里云服务器
前提:有阿里云服务器 在阿里云上注册了域名 域名已绑定IP地址 1.在阿里云平台 通过入站规则开启80端口 2.查看阿里云服务器80端口是否被占用 2.1.首先,讲一下如何查找端口占用。 netstat -ano | findstr ":80 " tasklist /fi "PID eq 4" 能够查看到被system占用了 2.2.运行中输入 regedit 打开注册表 2.3.找到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP 2.4.找到项Start,将其值改为0 3.修改tomcat端口为80 <Connector port="80" protocol="HTTP/1.1" address="0.0.0.0" connectionTimeout="20000" redirectPort="8453" /> 4.在tomcat的 server.xml 配置文件中 找到 host标签 在其中添加如下信息 <Context path="" docBase="项目名" debug="0" reloadable="true"/> 例如: <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation