Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently reading 'Definitive Guide to Apache mod_rewrite' and throughout the book there are other Apache modules mentioned that are better alternatives in given scenarios.

This has got me wondering what all is installed on my site. I don't have SSH access to the server, and I don't have access to any of the config files (afaik).

Is there any way for me to determine what is installed, or do I have to directly ask my host? I suppose certain commands could be run inside PHP (i.e. using backticks), but I'm not sure what the limitations of that are.

Thanks.

share|improve this question
add comment

3 Answers

I know this answer is not programmatic......

Ask the host administrator directly if you can.

You could try asking the administrator to activate the mod_info apache module and to configure the master httpd.conf server file (and point to a restricted URI for security) so that you could easily obtain the full configuration information using your web browser.

You could ask the host administrator to run the httpd command that another user provided above and send you the output.

share|improve this answer
add comment

There is an external method, but it will require knowing if it is turned on, and if it is installed at all.

The phpinfo() function might tell you some things about Apache, but it is mostly about PHP. If you can run commands through the web server, then running

httpd -t -D DUMP_MODULES

may work, but I wouldn't count on it.

Also, some modules may include data in the server responses even if they are not currently used. See http://www.netcraft.com/whats for an example of this sort of thing. My server currently reports:

Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.9-dev DAV/2 PHP/5.2.11 Phusion_Passenger/2.2.9

which seems to be accurate, which reminds me, I need to remove the PHP part.

share|improve this answer
add comment

Do you have access to .htaccess? I'd assume so, otherwise you have no control over the webserver, and you can't do anything with it, so there's no point in you knowing which modules you have.

If so, you could add various <IfModule> directives in the .htaccess file to do something (e.g. deny access to a certain file). You can then try to access the file. If you can access the file, then you don't have the module available.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.