Nginx configuration problem on the 1st IP multiple domain names?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 views
How to configure nginx to 1st IP multiple sites

In google a lot of information on configuring apache and nginx nothing Telkom no, including on the official website.

I will be glad to any useful information, the ideal course would be the config.


Wait there are 2 IP on which 1 site. The second IP bought purely for the test. On different IP all without problems, trying to do at the 1st comes out.


Part of the current config:


server {

listen 89.248.105.84:80;

server_name termoteks.ru www.termoteks.ru;


root /var/www/vhosts/termoteks.EN/public;

passenger_enabled on;

}


server {

listen 89.248.105.87:80;

server_name eugene-studio.ru www.eugene-studio.ru;


location / {

root /var/www/vhosts/eugene-studio.EN/public;

index index.html index.htm;

}


PS. as is clear from the part config all to spin on REE and passenger


PS.S. I forgot, I only have nginx and no apache
by | 4 views

2 Answers

0 like 0 dislike
Works for me so
\r
server {
listen X. X. X. X:80;
server_name cdn.XXXX.ru;
...
}
\r
server {
listen X. X. X. X:80;
server_name cdn.gdeposylka.ru l.gdeposylka.ru;
...
}
\r
in the listen Directive to the IP must be the same in both servers
by
0 like 0 dislike
You just need to listen 80, no ip.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Jun 10, 2019 by hazratgs
0 like 0 dislike
2 answers
asked Jun 5, 2019 by happy-cat
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
26,471 users