1. 配置nginx域名转发
<code>worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
gzip on;
server {
listen 80;
server_name www.evy123.com;
location / {
root html;
index index.html index.htm;
proxy_pass http://localhost:8080;
}
}
}</code>
2.配置本定host映射,否则无法解析出域名ip
<code>vim /etc/hosts #添加以下内容 127.0.0.1 www.evy123.com</code>
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!