nginx.conf

    server {
      listen       80;
      server_name  www.examples.com;
      client_max_body_size 300m; 
      #charset koi8-r;
      #access_log  logs/host.access.log  main;

        
      location / {
         index index.html;
            proxy_pass http://www.examples.com:8080;#这样写需配置hosts文件    指向本地tomcat
        }
    } 

 

tomcat_server.xml

<Host name="jiaozhou.taojietuan.com"  appBase="webapps"  unpackWARs="true" autoDeploy="true">
    <Context path="" docBase="/XXX/XXX/XXX"  reloadable="false">
        <ResourceLink name="XXX/XXX" global="XXX" type="javax.sql.DataSource"/>
    </Context>
</Host>

 

hosts:域名配置指向本地     linux系统hosts路径一般在/etc/hosts   

127.0.0.1 www.examples.com

相关文章:

  • 2022-12-23
  • 2021-12-21
  • 2021-04-21
  • 2021-04-16
  • 2021-04-05
  • 2021-05-16
  • 2021-10-24
猜你喜欢
  • 2021-08-20
  • 2022-12-23
  • 2021-04-16
  • 2021-06-06
  • 2021-09-09
  • 2021-11-22
  • 2021-12-09
相关资源
相似解决方案