Answer the question
In order to leave comments, you need to log in
Is there a way to get server_name inside a Docker container?
I need to make admin.localhost and localhost point to different webroots.
This is how it doesn't work:
server {
listen 80;
server_name: localhost
index index.php;
root /var/www/frontend/web;
}
server {
listen 80;
server_name: admin.localhost;
index index.php;
root /var/www/backend/web;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question