How to list all vhosts on CentOS 7? (nginx)

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have configured different virtual hosts on my machine. I want to ask the command which displays the list of all virtual hosts.
centos nginx
add a comment |Â
up vote
0
down vote
favorite
I have configured different virtual hosts on my machine. I want to ask the command which displays the list of all virtual hosts.
centos nginx
apache2ctl -S
â ivanivan
Apr 3 at 15:26
we are using ngnix
â flik
Apr 3 at 15:50
Next time you may want to add that to the question :) But... apparently there is no equivalent for nginx - see serverfault.com/questions/333440/â¦
â ivanivan
Apr 3 at 15:58
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have configured different virtual hosts on my machine. I want to ask the command which displays the list of all virtual hosts.
centos nginx
I have configured different virtual hosts on my machine. I want to ask the command which displays the list of all virtual hosts.
centos nginx
edited Apr 3 at 23:29
Yurij Goncharuk
2,2582521
2,2582521
asked Apr 3 at 15:18
flik
1485
1485
apache2ctl -S
â ivanivan
Apr 3 at 15:26
we are using ngnix
â flik
Apr 3 at 15:50
Next time you may want to add that to the question :) But... apparently there is no equivalent for nginx - see serverfault.com/questions/333440/â¦
â ivanivan
Apr 3 at 15:58
add a comment |Â
apache2ctl -S
â ivanivan
Apr 3 at 15:26
we are using ngnix
â flik
Apr 3 at 15:50
Next time you may want to add that to the question :) But... apparently there is no equivalent for nginx - see serverfault.com/questions/333440/â¦
â ivanivan
Apr 3 at 15:58
apache2ctl -Sâ ivanivan
Apr 3 at 15:26
apache2ctl -Sâ ivanivan
Apr 3 at 15:26
we are using ngnix
â flik
Apr 3 at 15:50
we are using ngnix
â flik
Apr 3 at 15:50
Next time you may want to add that to the question :) But... apparently there is no equivalent for nginx - see serverfault.com/questions/333440/â¦
â ivanivan
Apr 3 at 15:58
Next time you may want to add that to the question :) But... apparently there is no equivalent for nginx - see serverfault.com/questions/333440/â¦
â ivanivan
Apr 3 at 15:58
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
grep -RiI server_name /etc/nginx/conf.d/sites-enabled/
Use this command for CentOS7.
Suggestion; form a habit of putting command options before all of the arguments.
â Jeff Schaller
Apr 4 at 11:32
add a comment |Â
up vote
0
down vote
in https://stackoverflow.com/questions/32400933/how-can-i-list-all-vhosts-in-nginx its the answer:
grep server_name /etc/nginx/sites-enabled/* -RiI
grep: /etc/nginx/sites-enabled/*: No such file or directory Above output is coming
â flik
Apr 4 at 8:00
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
grep -RiI server_name /etc/nginx/conf.d/sites-enabled/
Use this command for CentOS7.
Suggestion; form a habit of putting command options before all of the arguments.
â Jeff Schaller
Apr 4 at 11:32
add a comment |Â
up vote
1
down vote
accepted
grep -RiI server_name /etc/nginx/conf.d/sites-enabled/
Use this command for CentOS7.
Suggestion; form a habit of putting command options before all of the arguments.
â Jeff Schaller
Apr 4 at 11:32
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
grep -RiI server_name /etc/nginx/conf.d/sites-enabled/
Use this command for CentOS7.
grep -RiI server_name /etc/nginx/conf.d/sites-enabled/
Use this command for CentOS7.
edited Apr 4 at 11:47
Jeff Schaller
31.1k846105
31.1k846105
answered Apr 4 at 10:34
Naqash Malik
1262
1262
Suggestion; form a habit of putting command options before all of the arguments.
â Jeff Schaller
Apr 4 at 11:32
add a comment |Â
Suggestion; form a habit of putting command options before all of the arguments.
â Jeff Schaller
Apr 4 at 11:32
Suggestion; form a habit of putting command options before all of the arguments.
â Jeff Schaller
Apr 4 at 11:32
Suggestion; form a habit of putting command options before all of the arguments.
â Jeff Schaller
Apr 4 at 11:32
add a comment |Â
up vote
0
down vote
in https://stackoverflow.com/questions/32400933/how-can-i-list-all-vhosts-in-nginx its the answer:
grep server_name /etc/nginx/sites-enabled/* -RiI
grep: /etc/nginx/sites-enabled/*: No such file or directory Above output is coming
â flik
Apr 4 at 8:00
add a comment |Â
up vote
0
down vote
in https://stackoverflow.com/questions/32400933/how-can-i-list-all-vhosts-in-nginx its the answer:
grep server_name /etc/nginx/sites-enabled/* -RiI
grep: /etc/nginx/sites-enabled/*: No such file or directory Above output is coming
â flik
Apr 4 at 8:00
add a comment |Â
up vote
0
down vote
up vote
0
down vote
in https://stackoverflow.com/questions/32400933/how-can-i-list-all-vhosts-in-nginx its the answer:
grep server_name /etc/nginx/sites-enabled/* -RiI
in https://stackoverflow.com/questions/32400933/how-can-i-list-all-vhosts-in-nginx its the answer:
grep server_name /etc/nginx/sites-enabled/* -RiI
edited Apr 4 at 11:35
Jeff Schaller
31.1k846105
31.1k846105
answered Apr 3 at 16:34
elfer
91
91
grep: /etc/nginx/sites-enabled/*: No such file or directory Above output is coming
â flik
Apr 4 at 8:00
add a comment |Â
grep: /etc/nginx/sites-enabled/*: No such file or directory Above output is coming
â flik
Apr 4 at 8:00
grep: /etc/nginx/sites-enabled/*: No such file or directory Above output is coming
â flik
Apr 4 at 8:00
grep: /etc/nginx/sites-enabled/*: No such file or directory Above output is coming
â flik
Apr 4 at 8:00
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435306%2fhow-to-list-all-vhosts-on-centos-7-nginx%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
apache2ctl -Sâ ivanivan
Apr 3 at 15:26
we are using ngnix
â flik
Apr 3 at 15:50
Next time you may want to add that to the question :) But... apparently there is no equivalent for nginx - see serverfault.com/questions/333440/â¦
â ivanivan
Apr 3 at 15:58