Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi, I currently busy with an internship, and standard is apache 2.2.3 installed. I need to set up an development envirment. For that i need an own apache server. i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    14

    Apache 2.4 installed but still running 2.2.3


    Hi,

    I currently busy with an internship, and standard is apache 2.2.3 installed.

    I need to set up an development envirment.
    For that i need an own apache server. i choosed apache 2.4
    i installed it from source, set prefix etc.

    after installation i restarted service httpd but when i check the version i see that 2.2.3 is running and not 2.4.

    How can i set the apache server so that 2.4 is running and not 2.2.3?

    *edit*

    I run redhat_e5 64 bit

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    893
    Hello,

    Short of making an RPM yourself and installing in into the system, assuming the install went okay, you'll need to start that apache manually (or with your own init script) using it's binary.

  3. #3
    Just Joined!
    Join Date
    Jan 2007
    Posts
    5
    Hi .

    Start the apache from the directory where apache is installed I mean the compiled version . For eg /opt/httpd/bin/apachectl -k start

    Ps apache will be installed in the directory Which u give for prefix .

  4. #4
    Just Joined!
    Join Date
    May 2012
    Posts
    14
    I tried the apachectl -k start but it says that is already running but when when i check httpd -v it gives me 2.2.3, and even when i installed phpmyadmin an looked at the section webserver it says 2.2.3?

  5. #5
    Just Joined!
    Join Date
    Mar 2008
    Posts
    25

    path

    Quote Originally Posted by L03TJ3 View Post
    I tried the apachectl -k start but it says that is already running but when when i check httpd -v it gives me 2.2.3, and even when i installed phpmyadmin an looked at the section webserver it says 2.2.3?
    Where did you install the newer version of Apache? You cannot invoke Apache without doing 1 of 2 things:

    1. modify your path variable such that the newer version of Apache is first

    or

    2. specify the full path to Apache when you start up the new version. For example, if you installed the newer version of Apache in "/my_directory/apache" then you must run it like this:

    /my_directory/apache/bin/apachectl -k start

    HTH

  6. #6
    Just Joined!
    Join Date
    May 2012
    Posts
    14
    1. where should i modify the path variable?

    2. when i bash it without the full path i get the error that it is already running. i then tried your suggestion to use the full path name and then i get this

    AH00557: httpd: apr_sockaddr_info_get() failed for {user}
    AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
    (9Address already in use: AH00072: make_sock: could not bind to address [::]:80
    (9Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    AH00015: Unable to open logs

    first i thought i just didn't had the right permissions but when it tried it as root i get the same errors?

  7. #7
    Just Joined!
    Join Date
    Jan 2007
    Posts
    5
    Hi

    It seems that the httpd is already running , ie the 2.2 version so u have to stop the apache or run the compiled apache on a different port .

    as root run the below commands

    service httpd stop
    service httpd status .

    Now start the complied apache . With the /opt/apache/bin/apachectl -k start .

    U have to give the complete path or else the other apache wil start bcos its already in the path variable .


    Do u need to have both apache running bcos if not remove the apache which was installed using rpm .

  8. #8
    Just Joined!
    Join Date
    May 2012
    Posts
    14
    I did as told but now i have even a bigger problem

    i stopped the service httpd then i tried to start the apachetl -k start didn't work. just same error as when 2.2 was running
    but now when i do service httpd start i ALSO get the error message that the address is already in use
    so now my apache doesn´t work at all!
    how can i fix this?

    *edit*

    alright. i restarted my pc and httpd is working again.
    @ultrapain you mentioned modifying path variable? where do i need to modify it?

  9. #9
    Just Joined!
    Join Date
    Jan 2007
    Posts
    5
    Hi

    Run ps -ef | grep httpd

    Check if process is running .

    netstat -an | grep 80


    Post the output of the errors .

  10. #10
    Just Joined!
    Join Date
    Mar 2008
    Posts
    25

    PATH variable

    Quote Originally Posted by L03TJ3 View Post
    I did as told but now i have even a bigger problem

    i stopped the service httpd then i tried to start the apachetl -k start didn't work. just same error as when 2.2 was running
    but now when i do service httpd start i ALSO get the error message that the address is already in use
    so now my apache doesn´t work at all!
    how can i fix this?

    *edit*

    alright. i restarted my pc and httpd is working again.
    @ultrapain you mentioned modifying path variable? where do i need to modify it?
    First, note that you are running more than 1 version of Apache. If you modify your PATH variable to have the newer version in front of the older version, you'll need to start the older version the same way we're telling you to start the newer version, so pick your poison. With regard to your question, you need to edit the file ".bash_profile" in root's home directory. You should see a line for PATH, where you can put the full path to the newer version of apachectl. DO NOT include "apachectl" in the PATH. For example:

    old:
    PATH=/usr/bin:/usr/sbin; export PATH

    new
    PATH=/my_new_apache_dir/bin:/usr/bin:/usr/sbin; export PATH

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •