How to determine which webserver is installed with no information? [closed]
I've recently taken over a project after a developer caused issues with the client. However, due to the lack of documentation (laugh) I have no idea where the website files are stored or what webserver has been installed.
Questions:
In Linux, how can I see what webserver has been installed?
In Linux, how can I find where the webserver points to in the file directory? (aware that this will depend on the answer from the first question)
** Hosted on Linode
linux webserver
closed as too broad by n.st, G-Man, Fabby, Jeff Schaller, RalfFriedl Dec 9 at 18:38
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I've recently taken over a project after a developer caused issues with the client. However, due to the lack of documentation (laugh) I have no idea where the website files are stored or what webserver has been installed.
Questions:
In Linux, how can I see what webserver has been installed?
In Linux, how can I find where the webserver points to in the file directory? (aware that this will depend on the answer from the first question)
** Hosted on Linode
linux webserver
closed as too broad by n.st, G-Man, Fabby, Jeff Schaller, RalfFriedl Dec 9 at 18:38
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
Does the system show a net interface on an IP address? A brute forse approach might be to analyze the files the server shows on the net and to search it with "find . -iname filename". If you find a file you may individuate the path where are the site file and then search such a path (or part of it) into the files into the /etc directory. I think the webserver nay be Apache or Tomcat. Both servers have configuration file where're all info needing to start the server.
– Sir Jo Black
Dec 8 at 18:43
2
An important first step will be to find out what Linux distribution is running on the server. The next steps may depend quite strongly on that detail. We may be able to give you some hints, but as it stands your question seems to broad to generate a concise and useful answer. For step-by-step debugging, a chat room/IRC might be more useful.
– n.st
Dec 8 at 18:48
add a comment |
I've recently taken over a project after a developer caused issues with the client. However, due to the lack of documentation (laugh) I have no idea where the website files are stored or what webserver has been installed.
Questions:
In Linux, how can I see what webserver has been installed?
In Linux, how can I find where the webserver points to in the file directory? (aware that this will depend on the answer from the first question)
** Hosted on Linode
linux webserver
I've recently taken over a project after a developer caused issues with the client. However, due to the lack of documentation (laugh) I have no idea where the website files are stored or what webserver has been installed.
Questions:
In Linux, how can I see what webserver has been installed?
In Linux, how can I find where the webserver points to in the file directory? (aware that this will depend on the answer from the first question)
** Hosted on Linode
linux webserver
linux webserver
edited Dec 9 at 0:29
justinnoor.io
348218
348218
asked Dec 8 at 18:34
mfisher91
1021
1021
closed as too broad by n.st, G-Man, Fabby, Jeff Schaller, RalfFriedl Dec 9 at 18:38
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by n.st, G-Man, Fabby, Jeff Schaller, RalfFriedl Dec 9 at 18:38
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
Does the system show a net interface on an IP address? A brute forse approach might be to analyze the files the server shows on the net and to search it with "find . -iname filename". If you find a file you may individuate the path where are the site file and then search such a path (or part of it) into the files into the /etc directory. I think the webserver nay be Apache or Tomcat. Both servers have configuration file where're all info needing to start the server.
– Sir Jo Black
Dec 8 at 18:43
2
An important first step will be to find out what Linux distribution is running on the server. The next steps may depend quite strongly on that detail. We may be able to give you some hints, but as it stands your question seems to broad to generate a concise and useful answer. For step-by-step debugging, a chat room/IRC might be more useful.
– n.st
Dec 8 at 18:48
add a comment |
1
Does the system show a net interface on an IP address? A brute forse approach might be to analyze the files the server shows on the net and to search it with "find . -iname filename". If you find a file you may individuate the path where are the site file and then search such a path (or part of it) into the files into the /etc directory. I think the webserver nay be Apache or Tomcat. Both servers have configuration file where're all info needing to start the server.
– Sir Jo Black
Dec 8 at 18:43
2
An important first step will be to find out what Linux distribution is running on the server. The next steps may depend quite strongly on that detail. We may be able to give you some hints, but as it stands your question seems to broad to generate a concise and useful answer. For step-by-step debugging, a chat room/IRC might be more useful.
– n.st
Dec 8 at 18:48
1
1
Does the system show a net interface on an IP address? A brute forse approach might be to analyze the files the server shows on the net and to search it with "find . -iname filename". If you find a file you may individuate the path where are the site file and then search such a path (or part of it) into the files into the /etc directory. I think the webserver nay be Apache or Tomcat. Both servers have configuration file where're all info needing to start the server.
– Sir Jo Black
Dec 8 at 18:43
Does the system show a net interface on an IP address? A brute forse approach might be to analyze the files the server shows on the net and to search it with "find . -iname filename". If you find a file you may individuate the path where are the site file and then search such a path (or part of it) into the files into the /etc directory. I think the webserver nay be Apache or Tomcat. Both servers have configuration file where're all info needing to start the server.
– Sir Jo Black
Dec 8 at 18:43
2
2
An important first step will be to find out what Linux distribution is running on the server. The next steps may depend quite strongly on that detail. We may be able to give you some hints, but as it stands your question seems to broad to generate a concise and useful answer. For step-by-step debugging, a chat room/IRC might be more useful.
– n.st
Dec 8 at 18:48
An important first step will be to find out what Linux distribution is running on the server. The next steps may depend quite strongly on that detail. We may be able to give you some hints, but as it stands your question seems to broad to generate a concise and useful answer. For step-by-step debugging, a chat room/IRC might be more useful.
– n.st
Dec 8 at 18:48
add a comment |
4 Answers
4
active
oldest
votes
A basic approach would be to use netstat -tnlp with an additional grep on the browser ports that it is supposed to be serving. Typically, that would then be:
netstat -tnlp | grep 80
netstat -tnlp | grep 443
That should list the process PID and name that owns these ports. That should give you a clue which server it is.
Then, locate the configuration files for that server application, e.g. /etc/httpd.
add a comment |
There is no such things as the webserver in linux. Several different servers exist that could do the job. The most common are probably Apache httpd and nginx.
In general you should start by finding out which it is, and then look at it's configuration.
One option to find out which webserver is installed is using netstat to see what is listening to the ports commonly used for HTTP traffic, 80 (for unencryted) and 443 (for encrypted/HTTPS) are the most common. But if there is some proxy in front, any port might be used, in that case 8080 and 8443 are common choices.
Another option would be to utilise your distribution's package system. The tools to use depend a lot on which distribution you have, on Debian it would be something like dpkg -l | grep -i web, it probably outputs several packages, but the relevant should be aming, and easy to pick from the descriptions.
In this specific case it might make sense to just see if the two common choices have configuration on the system. In most cases apache httpd will have it's configuration in /etc/apache (possibly /etc/apache2), nginx often in /etc/nginx.
For apache httpd, the relevant setting will often be DocumentRoot, for nginx it's most commonly root, but both can be configured to do almost anything (Apache httpd supports ModRewrite that is said to be Turing complete, making it theoretically capable of doing absolutely anything), so it can be a bit difficult to find what you need.
add a comment |
In Linux, how can I see what webserver has been installed?
Assuming the server is fully accessible (sudoer/wheel or root), first you need to check for ports open for any webserver. It is usually 80 and 443 , but you can filter by checking for the webserver service names in process list. (nginx / apache / httpd)
netstat, ps, grep, find tools would help you.
nginx -V
httpd -V
commands would give you the main configuration file location, that can be used to find the individual site configuration.
https://www.linode.com/docs/web-servers/nginx/how-to-configure-nginx/
https://www.linode.com/docs/web-servers/apache/
might be helpful to you.
Please be aware the location or paths differ depending on method of package installation and options passed to installer or during compilation.
The worst case is to run a find command across file system to search for files having name index or default.
add a comment |
If your webserver runs on standard port see "netstat -tulpen |grep 80". It should tell you which service is running. Now you can check the configs, you'll find them normally in /etc/servicename, for example: apache configs are likely to find in /etc/apache2/. There you'll get hints where the files are located. There might be other ports used by other services as well, check netstat output without limitation to port 80 closely.
But PLEASE don't. You obviously don't have enough knowledge to run the system all by yourself. It will be taken over from malicious people sooner or later (likely sooner). You will be responsible. Your Boss will be too. This can have BAD consequences. Ask someone who knows what he/she is doing. PLEASE.
(crosspost: copied answer over from stackexchange)
If you copied all or part of your answer, link to the place you copied from, and name the original author.
– G-Man
Dec 8 at 21:08
G-Man: copied from my own answer to his crossposted question; saw it on se first. its marked as offtopic there, guess it will go away soon, and therefor I did not include any soon dangeling links. - thanks for hints anyway
– user2567875
Dec 8 at 21:14
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
A basic approach would be to use netstat -tnlp with an additional grep on the browser ports that it is supposed to be serving. Typically, that would then be:
netstat -tnlp | grep 80
netstat -tnlp | grep 443
That should list the process PID and name that owns these ports. That should give you a clue which server it is.
Then, locate the configuration files for that server application, e.g. /etc/httpd.
add a comment |
A basic approach would be to use netstat -tnlp with an additional grep on the browser ports that it is supposed to be serving. Typically, that would then be:
netstat -tnlp | grep 80
netstat -tnlp | grep 443
That should list the process PID and name that owns these ports. That should give you a clue which server it is.
Then, locate the configuration files for that server application, e.g. /etc/httpd.
add a comment |
A basic approach would be to use netstat -tnlp with an additional grep on the browser ports that it is supposed to be serving. Typically, that would then be:
netstat -tnlp | grep 80
netstat -tnlp | grep 443
That should list the process PID and name that owns these ports. That should give you a clue which server it is.
Then, locate the configuration files for that server application, e.g. /etc/httpd.
A basic approach would be to use netstat -tnlp with an additional grep on the browser ports that it is supposed to be serving. Typically, that would then be:
netstat -tnlp | grep 80
netstat -tnlp | grep 443
That should list the process PID and name that owns these ports. That should give you a clue which server it is.
Then, locate the configuration files for that server application, e.g. /etc/httpd.
edited Dec 8 at 19:14
n.st
5,23611943
5,23611943
answered Dec 8 at 19:01
lx2610
252
252
add a comment |
add a comment |
There is no such things as the webserver in linux. Several different servers exist that could do the job. The most common are probably Apache httpd and nginx.
In general you should start by finding out which it is, and then look at it's configuration.
One option to find out which webserver is installed is using netstat to see what is listening to the ports commonly used for HTTP traffic, 80 (for unencryted) and 443 (for encrypted/HTTPS) are the most common. But if there is some proxy in front, any port might be used, in that case 8080 and 8443 are common choices.
Another option would be to utilise your distribution's package system. The tools to use depend a lot on which distribution you have, on Debian it would be something like dpkg -l | grep -i web, it probably outputs several packages, but the relevant should be aming, and easy to pick from the descriptions.
In this specific case it might make sense to just see if the two common choices have configuration on the system. In most cases apache httpd will have it's configuration in /etc/apache (possibly /etc/apache2), nginx often in /etc/nginx.
For apache httpd, the relevant setting will often be DocumentRoot, for nginx it's most commonly root, but both can be configured to do almost anything (Apache httpd supports ModRewrite that is said to be Turing complete, making it theoretically capable of doing absolutely anything), so it can be a bit difficult to find what you need.
add a comment |
There is no such things as the webserver in linux. Several different servers exist that could do the job. The most common are probably Apache httpd and nginx.
In general you should start by finding out which it is, and then look at it's configuration.
One option to find out which webserver is installed is using netstat to see what is listening to the ports commonly used for HTTP traffic, 80 (for unencryted) and 443 (for encrypted/HTTPS) are the most common. But if there is some proxy in front, any port might be used, in that case 8080 and 8443 are common choices.
Another option would be to utilise your distribution's package system. The tools to use depend a lot on which distribution you have, on Debian it would be something like dpkg -l | grep -i web, it probably outputs several packages, but the relevant should be aming, and easy to pick from the descriptions.
In this specific case it might make sense to just see if the two common choices have configuration on the system. In most cases apache httpd will have it's configuration in /etc/apache (possibly /etc/apache2), nginx often in /etc/nginx.
For apache httpd, the relevant setting will often be DocumentRoot, for nginx it's most commonly root, but both can be configured to do almost anything (Apache httpd supports ModRewrite that is said to be Turing complete, making it theoretically capable of doing absolutely anything), so it can be a bit difficult to find what you need.
add a comment |
There is no such things as the webserver in linux. Several different servers exist that could do the job. The most common are probably Apache httpd and nginx.
In general you should start by finding out which it is, and then look at it's configuration.
One option to find out which webserver is installed is using netstat to see what is listening to the ports commonly used for HTTP traffic, 80 (for unencryted) and 443 (for encrypted/HTTPS) are the most common. But if there is some proxy in front, any port might be used, in that case 8080 and 8443 are common choices.
Another option would be to utilise your distribution's package system. The tools to use depend a lot on which distribution you have, on Debian it would be something like dpkg -l | grep -i web, it probably outputs several packages, but the relevant should be aming, and easy to pick from the descriptions.
In this specific case it might make sense to just see if the two common choices have configuration on the system. In most cases apache httpd will have it's configuration in /etc/apache (possibly /etc/apache2), nginx often in /etc/nginx.
For apache httpd, the relevant setting will often be DocumentRoot, for nginx it's most commonly root, but both can be configured to do almost anything (Apache httpd supports ModRewrite that is said to be Turing complete, making it theoretically capable of doing absolutely anything), so it can be a bit difficult to find what you need.
There is no such things as the webserver in linux. Several different servers exist that could do the job. The most common are probably Apache httpd and nginx.
In general you should start by finding out which it is, and then look at it's configuration.
One option to find out which webserver is installed is using netstat to see what is listening to the ports commonly used for HTTP traffic, 80 (for unencryted) and 443 (for encrypted/HTTPS) are the most common. But if there is some proxy in front, any port might be used, in that case 8080 and 8443 are common choices.
Another option would be to utilise your distribution's package system. The tools to use depend a lot on which distribution you have, on Debian it would be something like dpkg -l | grep -i web, it probably outputs several packages, but the relevant should be aming, and easy to pick from the descriptions.
In this specific case it might make sense to just see if the two common choices have configuration on the system. In most cases apache httpd will have it's configuration in /etc/apache (possibly /etc/apache2), nginx often in /etc/nginx.
For apache httpd, the relevant setting will often be DocumentRoot, for nginx it's most commonly root, but both can be configured to do almost anything (Apache httpd supports ModRewrite that is said to be Turing complete, making it theoretically capable of doing absolutely anything), so it can be a bit difficult to find what you need.
edited Dec 8 at 19:28
answered Dec 8 at 19:23
Henrik
3,5831419
3,5831419
add a comment |
add a comment |
In Linux, how can I see what webserver has been installed?
Assuming the server is fully accessible (sudoer/wheel or root), first you need to check for ports open for any webserver. It is usually 80 and 443 , but you can filter by checking for the webserver service names in process list. (nginx / apache / httpd)
netstat, ps, grep, find tools would help you.
nginx -V
httpd -V
commands would give you the main configuration file location, that can be used to find the individual site configuration.
https://www.linode.com/docs/web-servers/nginx/how-to-configure-nginx/
https://www.linode.com/docs/web-servers/apache/
might be helpful to you.
Please be aware the location or paths differ depending on method of package installation and options passed to installer or during compilation.
The worst case is to run a find command across file system to search for files having name index or default.
add a comment |
In Linux, how can I see what webserver has been installed?
Assuming the server is fully accessible (sudoer/wheel or root), first you need to check for ports open for any webserver. It is usually 80 and 443 , but you can filter by checking for the webserver service names in process list. (nginx / apache / httpd)
netstat, ps, grep, find tools would help you.
nginx -V
httpd -V
commands would give you the main configuration file location, that can be used to find the individual site configuration.
https://www.linode.com/docs/web-servers/nginx/how-to-configure-nginx/
https://www.linode.com/docs/web-servers/apache/
might be helpful to you.
Please be aware the location or paths differ depending on method of package installation and options passed to installer or during compilation.
The worst case is to run a find command across file system to search for files having name index or default.
add a comment |
In Linux, how can I see what webserver has been installed?
Assuming the server is fully accessible (sudoer/wheel or root), first you need to check for ports open for any webserver. It is usually 80 and 443 , but you can filter by checking for the webserver service names in process list. (nginx / apache / httpd)
netstat, ps, grep, find tools would help you.
nginx -V
httpd -V
commands would give you the main configuration file location, that can be used to find the individual site configuration.
https://www.linode.com/docs/web-servers/nginx/how-to-configure-nginx/
https://www.linode.com/docs/web-servers/apache/
might be helpful to you.
Please be aware the location or paths differ depending on method of package installation and options passed to installer or during compilation.
The worst case is to run a find command across file system to search for files having name index or default.
In Linux, how can I see what webserver has been installed?
Assuming the server is fully accessible (sudoer/wheel or root), first you need to check for ports open for any webserver. It is usually 80 and 443 , but you can filter by checking for the webserver service names in process list. (nginx / apache / httpd)
netstat, ps, grep, find tools would help you.
nginx -V
httpd -V
commands would give you the main configuration file location, that can be used to find the individual site configuration.
https://www.linode.com/docs/web-servers/nginx/how-to-configure-nginx/
https://www.linode.com/docs/web-servers/apache/
might be helpful to you.
Please be aware the location or paths differ depending on method of package installation and options passed to installer or during compilation.
The worst case is to run a find command across file system to search for files having name index or default.
answered Dec 8 at 20:32
Nikhil_CV
1053
1053
add a comment |
add a comment |
If your webserver runs on standard port see "netstat -tulpen |grep 80". It should tell you which service is running. Now you can check the configs, you'll find them normally in /etc/servicename, for example: apache configs are likely to find in /etc/apache2/. There you'll get hints where the files are located. There might be other ports used by other services as well, check netstat output without limitation to port 80 closely.
But PLEASE don't. You obviously don't have enough knowledge to run the system all by yourself. It will be taken over from malicious people sooner or later (likely sooner). You will be responsible. Your Boss will be too. This can have BAD consequences. Ask someone who knows what he/she is doing. PLEASE.
(crosspost: copied answer over from stackexchange)
If you copied all or part of your answer, link to the place you copied from, and name the original author.
– G-Man
Dec 8 at 21:08
G-Man: copied from my own answer to his crossposted question; saw it on se first. its marked as offtopic there, guess it will go away soon, and therefor I did not include any soon dangeling links. - thanks for hints anyway
– user2567875
Dec 8 at 21:14
add a comment |
If your webserver runs on standard port see "netstat -tulpen |grep 80". It should tell you which service is running. Now you can check the configs, you'll find them normally in /etc/servicename, for example: apache configs are likely to find in /etc/apache2/. There you'll get hints where the files are located. There might be other ports used by other services as well, check netstat output without limitation to port 80 closely.
But PLEASE don't. You obviously don't have enough knowledge to run the system all by yourself. It will be taken over from malicious people sooner or later (likely sooner). You will be responsible. Your Boss will be too. This can have BAD consequences. Ask someone who knows what he/she is doing. PLEASE.
(crosspost: copied answer over from stackexchange)
If you copied all or part of your answer, link to the place you copied from, and name the original author.
– G-Man
Dec 8 at 21:08
G-Man: copied from my own answer to his crossposted question; saw it on se first. its marked as offtopic there, guess it will go away soon, and therefor I did not include any soon dangeling links. - thanks for hints anyway
– user2567875
Dec 8 at 21:14
add a comment |
If your webserver runs on standard port see "netstat -tulpen |grep 80". It should tell you which service is running. Now you can check the configs, you'll find them normally in /etc/servicename, for example: apache configs are likely to find in /etc/apache2/. There you'll get hints where the files are located. There might be other ports used by other services as well, check netstat output without limitation to port 80 closely.
But PLEASE don't. You obviously don't have enough knowledge to run the system all by yourself. It will be taken over from malicious people sooner or later (likely sooner). You will be responsible. Your Boss will be too. This can have BAD consequences. Ask someone who knows what he/she is doing. PLEASE.
(crosspost: copied answer over from stackexchange)
If your webserver runs on standard port see "netstat -tulpen |grep 80". It should tell you which service is running. Now you can check the configs, you'll find them normally in /etc/servicename, for example: apache configs are likely to find in /etc/apache2/. There you'll get hints where the files are located. There might be other ports used by other services as well, check netstat output without limitation to port 80 closely.
But PLEASE don't. You obviously don't have enough knowledge to run the system all by yourself. It will be taken over from malicious people sooner or later (likely sooner). You will be responsible. Your Boss will be too. This can have BAD consequences. Ask someone who knows what he/she is doing. PLEASE.
(crosspost: copied answer over from stackexchange)
answered Dec 8 at 21:00
user2567875
1011
1011
If you copied all or part of your answer, link to the place you copied from, and name the original author.
– G-Man
Dec 8 at 21:08
G-Man: copied from my own answer to his crossposted question; saw it on se first. its marked as offtopic there, guess it will go away soon, and therefor I did not include any soon dangeling links. - thanks for hints anyway
– user2567875
Dec 8 at 21:14
add a comment |
If you copied all or part of your answer, link to the place you copied from, and name the original author.
– G-Man
Dec 8 at 21:08
G-Man: copied from my own answer to his crossposted question; saw it on se first. its marked as offtopic there, guess it will go away soon, and therefor I did not include any soon dangeling links. - thanks for hints anyway
– user2567875
Dec 8 at 21:14
If you copied all or part of your answer, link to the place you copied from, and name the original author.
– G-Man
Dec 8 at 21:08
If you copied all or part of your answer, link to the place you copied from, and name the original author.
– G-Man
Dec 8 at 21:08
G-Man: copied from my own answer to his crossposted question; saw it on se first. its marked as offtopic there, guess it will go away soon, and therefor I did not include any soon dangeling links. - thanks for hints anyway
– user2567875
Dec 8 at 21:14
G-Man: copied from my own answer to his crossposted question; saw it on se first. its marked as offtopic there, guess it will go away soon, and therefor I did not include any soon dangeling links. - thanks for hints anyway
– user2567875
Dec 8 at 21:14
add a comment |
1
Does the system show a net interface on an IP address? A brute forse approach might be to analyze the files the server shows on the net and to search it with "find . -iname filename". If you find a file you may individuate the path where are the site file and then search such a path (or part of it) into the files into the /etc directory. I think the webserver nay be Apache or Tomcat. Both servers have configuration file where're all info needing to start the server.
– Sir Jo Black
Dec 8 at 18:43
2
An important first step will be to find out what Linux distribution is running on the server. The next steps may depend quite strongly on that detail. We may be able to give you some hints, but as it stands your question seems to broad to generate a concise and useful answer. For step-by-step debugging, a chat room/IRC might be more useful.
– n.st
Dec 8 at 18:48