Router - Ask about nginx+apache configuration
黄舟
黄舟 2017-05-16 17:04:01
0
1
537

Newbie help: I ​​want to build a typical nginx + reverse proxy apache server
The current configuration is as follows. The server is located on the intranet. nginx listens on port 80 and apache listens on port 81. The router has done nginx port mapping 8080->80 and has not done apache port mapping
I would like to know:
1. How to complete the reverse proxy configuration like most websites
2. If the router only does nginx port mapping (8080 to 80), can reverse proxy be implemented? Or do I need to do port mapping for apache?
3. Can this configuration mode support .htaccess?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
迷茫

1.

Apache2:

Listen 127.0.0.1:81

Nginx:

server {
    listen 80;
    location / {
        proxy_pass http://127.0.0.1:81;
    }
}

2.

Routing port mapping is only related to Nginx.

3.

Supported, usually just rewrite it in Apache2.
Or you can use Nginx to process some static file requests in advance without forwarding them to Apache2.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template