Read about configure nginx as reverse proxy, The latest news, videos, and discussion topics about configure nginx as reverse proxy from alibabacloud.com
Configure nginx reverse proxy Apache for different ports with the same IP address (that is, nginx jumps to Apache)
Nginx and Apache have been installed in a Linux environment since the default port is 80.
Generally, the server p
What is reverse proxy?
A reverse proxy is a proxy server that accepts connection requests from the Internet and forwards the requests to an internal (or other) network server, return the result obtained from the server to the Client Requesting connection from the Internet.
Node.js development of the site, if you are also using the Nginx to implement reverse proxy.
Then the server can easily achieve gzip compression, so that the site browsing more smoothly.
Prerequisite: Node.js + nginx reverse proxy
Node development phase, generally used
httpModule to start a local server, easy to debug.
It's probably like this:
varrequire("http");var server = http.createServer();server.listen(8888);
So the question is, how do I deploy my application to the VPS? You can't use it http://10.88.77.66:8888 to access it? Yes, the title of the article is the solution.
My environment is roughly the same centos 6 lnmp一键部署 . As lnmp for how to operate, I will not write. Google for yourself
Suppose my domain name is
to install MySQL[root@localhost ~]# yum–y Install Mysql-server
Note: This site relies on MySQL, using yum to install MySQL
[root@localhost ~]# yum–y Install Mysql-server
Install Javacenter
Creating databases and user names
[Root@localhost ~]# MySQLmysql> CREATE DATABASE Jcenter;Mysql> GRANT all on jcenter.* to ' jcenter ' @ ' localhost ' identified by ' Chris ';
After installing the configuration, you can go to the home page and display the following
may reach 5 ~ of Apache + mod_php ~ 10 times.
The FastCGI processor is required for nginx to be set as a PHP application server,
1. Apache reverse proxy configuration
After installing Apache, because the mod_proxy configuration is not loaded during installation, you have to add it later.
In the decompressed file (/Usr/local/src/apache2.2.21/) Execute the followi
Through Nginx reverse proxy, will not get the real IP, is to obtain the Nginx IP, to get the real IP to be configured nginx configuration file: nginx.conf
Proxy_set_header X-real-ip $remote _addr;
For example:
###############################################################
Let's write a little bit today. For an article on anti-generation IIS, the software that we want to use to reverse the generation of IIS is called the integration package UPUPW.
UPUPW includes the Apache version and the Nginx version, we use the Nginx version of this experiment, the specific details of UPUPW, you can go to the http://www.upupw.net/view.
Now tha
In Nginx, Proxy is used to implement the reverse proxy, upstream is used to achieve load balancing.For example, there are two servers, the Nginx server as a proxy server, execute. php files on the Apache server, the client sends t
access to the domain name will jump to the 127.0.0.1:8080 path.
We enter the www.123.com results on the browser side as follows:
④, summary
In fact, it is more appropriate to say that through the Nginx proxy port, the original access is 8080 port, through the Nginx proxy, through the 80 port can be accessed.5,
Forward proxies and reverse proxies are named from the data flow direction, forward proxies, proxy user requests, reverse proxies, alternate server accept requestsForward Proxy: User-"proxy server-" WWW user request data to the proxy
: This article mainly introduces the differences between nginx Reverse proxy and forward proxy. For more information about PHP tutorials, see. I have always had no idea how to understand the reverse direction of the reflection proxy
Resources to use:
Nginx Primary server One, Nginx standby server, use keepalived for downtime switching.
Tomcat server two, by Nginx reverse proxy and load balancing, here can build server cluster.
Redis server, used for session separation and sharing.
Nginx Reverse Proxy Server Load balancer page cache URL rewriting and read/write splitting
Outline
I. Preface
II. Environment preparation
3. install and configure Nginx
Iv. reverse proxy
;location/{ proxy_pass #修改为需要被反向代理的WebSocket的IP和端口号 proxy_http_version1.1; proxy_set_headerUpgrade $http _ upgrade;proxy_set_header connection $connection _upgrade;}} By default, if the proxy server does not transmit any data within 60 seconds, the connection is closed. This timeout can be increased by proxy_read_timeout instructions. Alternatively, the proxy server can be configured to periodically send a
index.html file, which is written in the Nginx,apache2 word is sufficient. then we configure the Nginx configuration file, generally nginx.conf this file, modify the configuration information inside. Location /{ proxy_pass 127.0.0.1:8080;}at the same time to start Nginx and Apache, visit 127.0.0.1, you will find a ma
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.