Proxy Server 80-port Nginx solution _nginx

Source: Internet
Author: User
The method is as follows:

First have to prepare a VPS, I used is foreign, I have the environment in the morning, so can't wait to test the next ...??? You don't know how to configure your environment?? It doesn't matter. Look at Brother's tutorial, connect the terminal with SSH, the implementation of the CentOS under the LNMP environment a key to install the content of this article, OK. It's going to be all right. Order those to look at the CentOS under some basic command to use, it is almost ... All right, all of this is about the same.


Then, we're not 80 sealed. Let's give the website a 81 port, I'm talking about IIS, that's Nginx and Apache. I really don't know how to give it. In short, to make the site accessible, regardless of the way ... and then to edit the nginx.conf. Before the last one, add the following ... Don't know how to add a site look at the above article

Copy Code code as follows:

server {
Listen 80;
server_name jb51.cn www.jb51.cn;
Proxy_set_header X-real-ip $remote _addr;
Proxy_set_header remote-host $remote _addr;
Proxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;

Access_log/home/www/logs/jb51.cn_access.log;

Location/robots.txt {

root/home/www/www.jb51.cn;

}

Location/{

Proxy_pass Http://IP or other domain name: 82;

}
}

That's good, easy ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.