Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-22-2006, 08:25 AM
|
#1
|
Member
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230
Rep:
|
Apache version
In Windows, Apache -v will give
Code:
Server version: Apache/2.0.58
Server built: Apr 29 2006 17:47:10
What do I have to enter to get this in Linux ?
I tried many options with httpd, apache - but shows command not found.
Thanks
|
|
|
06-22-2006, 09:04 AM
|
#2
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Try, "apachectl -v". On my system I get
Code:
Server version: Apache/2.2.0
Server built: May 26 2006 07:34:53
|
|
|
06-22-2006, 09:18 AM
|
#3
|
Member
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230
Original Poster
Rep:
|
Code:
-bash: apachectl: command not found
Im pretty sure its Apache 2.x because it shows Apache 2.0 handler in phpinfo - but Im trying to figure out the exact version.
|
|
|
06-22-2006, 12:09 PM
|
#4
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
If its not in your path, use "find" or "locate" to search for its location and then run it using the full path e.g. on my system its in /usr/local/apache2/bin.
|
|
|
06-22-2006, 06:53 PM
|
#5
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440
Rep:
|
apachectl -v doesn't tell me my apache version. However, you can find the exact version with a GET method like so:
Code:
telnet localhost 80
GET / HTTP/1.1
<hit enter here>
Now, you should see information regarding your apache server along with the documentroot page that you just requested.
-twantrd
|
|
|
06-23-2006, 11:31 AM
|
#6
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Another way is to use php. Just do
PHP Code:
print phpinfo();
If you look at the apache handler section, it tells you the version of apache you are running.
|
|
|
06-23-2006, 12:09 PM
|
#7
|
Member
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230
Original Poster
Rep:
|
Code:
HTTP/1.1 400 Bad Request
Date: Fri, 23 Jun 2006 17:08:16 GMT
Server:
Content-Length: 292
Connection: close
Content-Type: text/html; charset=iso-8859-1
phpinfo() shows only Apache 2 handler - not the exact version number.
|
|
|
06-23-2006, 12:27 PM
|
#8
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
When I use phpinfo() on my Suse 10.1 box and go to the apache2handler section, I get
Code:
Apache/2.2.0 (Unix) DAV/2 PHP/5.1.4
On my CentOS 4.3 (RHEL 4.3) server, apachectl shows the version number of apache as follows
Code:
[root@mulberry ~]# apachectl -v
Server version: Apache/2.0.52
Server built: Jan 5 2006 12:31:31
[root@mulberry ~]#
Last edited by reddazz; 06-23-2006 at 12:32 PM.
|
|
|
06-23-2006, 01:09 PM
|
#9
|
Member
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230
Original Poster
Rep:
|
Apparently, I had to give the full path /usr/sbin/apachectl -v to get it to work.
Shows Server version: Apache/2.0.51
Thanks.
BTW, reddazz, you are using Apache 2.2.x and not 2.0.x on your Suse 10.1 box which is probably why you are getting the version number in phpinfo. So far I havent seen the version number for Apache 2.0.x in phpinfo.
On my phpinfo page, Apache Version shows blank while Apache API Version shows 20020903.
|
|
|
10-05-2006, 04:30 AM
|
#10
|
LQ Newbie
Registered: Jun 2006
Posts: 5
Rep:
|
Hi i am using apache vertion 3.Apache/2.0.40 which does not support html page to post with the server
after that I install apache 1.3.33 which support posting just by submitng the page but getting error message
Method Not Allowed
The requested method POST is not allowed for the URL /~extranet/ut/frt_tmp.php.
pls help me
|
|
|
10-05-2006, 04:45 AM
|
#11
|
Member
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230
Original Poster
Rep:
|
I think you're talking about html pages not parsing PHP code.
Add this line to httpd.conf file or to your .htaccess file
Code:
AddType application/x-httpd-php .htm
|
|
|
10-05-2006, 09:36 AM
|
#12
|
Member
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451
Rep:
|
Works on my suse (from any dir)(as root).
It gives the apache version.
|
|
|
10-09-2006, 01:31 AM
|
#13
|
LQ Newbie
Registered: Jun 2006
Posts: 5
Rep:
|
I did what you asked me to do
AddType application/x-httpd-php .htm
in httpd.con file and restart the httpd server
but problem remian same
pls help me
|
|
|
10-09-2006, 02:11 AM
|
#14
|
Member
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451
Rep:
|
@prasanna_cpw: which linux distribution are you on?
- apache 1.33 is somewhat older. You could update it (not essential for your problem maybe).
- I'd say your php might not be installed (or configured) correctly.
If you have rpm packages on your distro do this to check what you have installed for php:
Code:
$ rpm -qa |grep php
php4-gd-4.4.0-6.18
apache2-mod_php4-4.4.0-6.18
php4-mysql-4.4.0-6
php4-4.4.0-6.18
php4-devel-4.4.0-6.18
php4-zlib-4.4.0-6
php4-session-4.4.0-6.18
|
|
|
All times are GMT -5. The time now is 11:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|