D
D
David Zurabyan2016-10-15 09:30:14
Nginx
David Zurabyan, 2016-10-15 09:30:14

How to create dynamic subdomains on nginx?

I have a YII2 application and I need to redirect all urls like http://localhost/test/project/domain/domain_name to http://domain_name.localhost/test. How can I configure nginx to enable prettyUrl YII2 and redirect the url as needed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-10-17
@qonand

to solve your problem, you need to:
1. Proxy the request at the nginx level, how to do this can be found here
2. Set up the url rules you need in the application

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question