How do I find the version of Apache on a shared hosting?

Hello SitePoint;

Question. What is the process for finding out the version of Apache on a shared hosting?

I am starting a website that needs URL Rewriting. The website is hosted on a GoDaddy shared hosting. I have found a tutorial that says I need to find the version of Apache.

I called GoDaddy technical support and asked them what version of Apache is being used on the hosting. The technical service rep said that he did not have access to the version of Apache and did not know which version of Apache is being used. Basically, GoDaddy won’t tell me the version.

The phpinfo() function doesn’t tell the version of Apache.

I would appreciate any assistance.

Thanks.

If they don’t tell you, chance that they hide that info in server side too. However, try with this function http://php.net/manual/en/function.apache-get-version.php

Thank you for responding to my question.

You’re right. They have hid it on the server side evidently.

I ran the apache_get_version() function and here is the response:
“Fatal error: Call to undefined function apache_get_version() in /home/content/59/4519259/html/ApacheGetVersion.php on line 2”

I ran the apache_lookup_uri function and got the same response:
“Fatal error: Call to undefined function apache_lookup_uri() in /home/content/59/4519259/html/sps_forms/ApacheLookUpURI.php on line 2”

I guess it’s going to have to be a trial-and-error process with the URL Rewrite coding.

Thanks again.

I have found a tutorial that says I need to find the version of Apache.

Why not just try the tutorial anyway - if it works you have a suitable version of Apache if it does not work you do not.

^^yes.

I’d be really shocked if they were using a version of apache that didn’t support mod_rewrite.

Check the headers…
Open the URL in Chrome, press F12, click on Network, Refresh the page, you’ll see a bunch of stuff load on the Network section (of the window that opened earlier), click on anything, then click on Headers. Look for Server: under the Response Headers

I saw a forum post dated July 2012 that says godaddy was running apache 2.2.13 (at the time).

Simple: phpinfo(); will provide ALL the information you can ever need about your server. Since it would also be usable by hackers, be sure to remove the file which calls this PHP function after you get the data (and save it to your computer).

Regards,

DK