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地址

相關文章
相關標籤/搜索