0

Given root access to a server that someone else had set up (and they either have no knowledge of how it's configured or won't tell you), what would be the fastest way to determine:

1) What webserver is running at port 80?

2) Is there any special configuration such as a reverse proxy that I need to be aware of?

3) Can the server be administered manually or must I use CPanel/Webmin/etc?

4) Is the server handling DNS or must it be setup elsewhere?

There are also many application specific questions such as should Ruby and gems be installed system-wide or use RVM to manage gems and rubies?

I don't want to mess up any existing services on this server but it's very difficult without being given any information by the previous admin.

1 Answer 1

0

1) Run fuser -n tcp 80 to see which process id is listening on port 80 a. Or run netstat -anp. Another option is to visit the site with a known incorrect path and see what the footer says at the bottom of the 404 page.

2) Once you've identified the server process, look in the config files for the configuration. Most will have readable files and it shouldn't be too hard to locate the proxy configuration (if there is one).

3) You've got root; you can administer it any way you like. I don't know of any software that requires Cpanel or similar to operate.

4) netstat -anp again and look for open TCP/UDP sockets on port 53. If you know the domains of the web sites that are being hosted there, then use dig -t ns example.com to find out their name servers.

I take it the previous admin is unavailable to answer any of these questions? If this is the case, (and without any prior documentation) then you won't truly have a handle on what's running on it until you rebuild it from scratch, yourself. This goes double if you've any reason not to trust the previous admin.

3
  • Thank you for the response. I can't wipe it because it's a client's server that is serving other sites. I know CPanel takes over some configuration files and makes it difficult to admin manually. If someone else should change a CPanel setting it might overwrite the changes. Feb 28, 2011 at 14:04
  • if its got cpanel on it then chances are it likely has a stock config of apache and running bind if its not been configured much past default its likely apache 2.0.x and php 5.2.9 or earlier Feb 28, 2011 at 14:14
  • I take your point. I haven't used web-based tools like this, so I'm not aware of how much they can get in the way of direct configuration. Likely you'll be able to find virtual host configurations for whatever is installed along with the main site configuration. Feb 28, 2011 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .