A
A
Alexander2016-08-05 11:35:58
Nginx
Alexander, 2016-08-05 11:35:58

Separate port for nginx directory?

how to make the site.com/sh/ directory access to a specific port?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nonname, 2016-08-05
@selmers

A lot of strange advice here.
The port in nginx is set in the server section.
Specific URIs are already processed by the location section, which in turn is in the server section.
It follows from this that in nginx you need to create something like this structure:

server {
listen <номер порта>;
server_name site.com;
...
location /sh/{
proxy_pass <ссылка на бекэнд>;
}}

Y
Yuri Chudnovsky, 2016-08-05
@Frankenstine

The server is listening on the port. So you need to configure the config of a separate site.

P
Puma Thailand, 2016-08-05
@opium

the port listens on ip, not on the program, take an additional ip and listen to the port there. no more heresy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question