M
M
Misha Shav2021-03-12 12:05:55
Nginx
Misha Shav, 2021-03-12 12:05:55

How to make a subdomain with the main page on one of the pages of the site?

Good afternoon! Subject:
There is a site on Yii and the nginx web server, I want to make a subdomain, the mainpage of which will be one of the pages of this subdomain,
i.e. there is mysite.com
there is a page mysite.com/page1
when sub.mysite.com was entered, mysite.com/page1 opened, while the user had sub.mysite.com in the browser, with the ability to navigate the entire site in the future.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Spetros, 2021-03-13
@Spetros

This is called proxying and can be done by setting proxy_pass in nginx.
https://nginx.org/ru/docs/http/ngx_http_proxy_modu...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question