finding all sites hosted on a nginx server

7,448

Solution 1

Is it possible for users to see all sites on the server ?

No it is not possible unless users have access to the conf file(s).

Solution 2

Either look in this file : /etc/nginx/nginx.conf or look at the files in this location /etc/nginx/sites-enabled/

Just depends how you have set you Nginx server up.

Share:
7,448

Related videos on Youtube

C0nw0nk
Author by

C0nw0nk

Updated on September 18, 2022

Comments

  • C0nw0nk
    C0nw0nk over 1 year

    So is it possible to find out every single site (vhost) hosted on a nginx server ?

    For example Nginx config :

    server {
    listen  80;
    server_name  domain1.com;
    }
    server {
    listen  80;
    server_name  domain2.com;
    }
    server {
    listen  80;
    server_name  domain3.com;
    }
    

    Is it possible for users to see all sites on the server ?

    • Michael Hampton
      Michael Hampton about 9 years
      Obviously, just go read the nginx configuration.
    • C0nw0nk
      C0nw0nk about 9 years
      Where in the documentation am i suppose to be looking ?
    • alexus
      alexus about 9 years
      cd $NGINX && grep -Ri server_name *
  • C0nw0nk
    C0nw0nk about 9 years
    Thanks for the information glad someone understood what i ment :P (my terrible descriptive skills) May also be at work.