nginx 使用

1.下载nginx包http://files.cnblogs.com/files/jyjin/nginx.ziphtml

2.解压后找到nginx.conf文件进行配置nginx

3.配置server选项:跨域

  server_name:可任意指定,是你的代理host名浏览器

  root:为本地项目根路径(index.html路径)代理

  listen:端口 server

           可配置多个server项,指定不一样端口来代理不一样项目htm

  location:所代理的跨域地址blog

 

4.配置hostip

   进入:C:\Windows\System32\drivers\etc\host文件 打开get

   在最后面添加代理到本地的ip地址和上述server配置好的主机名项

  

 5.浏览器访问该ip或host地址

相关文章
相关标签/搜索