httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Rumph <mike.ru...@oracle.com>
Subject Re: [users@httpd] sudo: apachectl: command not found
Date Wed, 01 Apr 2015 00:12:44 GMT
Hello Padmahas,

Okay.  This tells us a few things.
One problem is that the HTTPD_ROOT is set to /usr instead of 
/usr/local/apache2.
Other relative paths will be based from here.
Since the SERVER_CONFIG_FILE is set to conf/httpd.conf,
the default config file will be /usr/conf/httpd.conf instead of 
/usr/local/apache2/conf/httpd.conf.
The -f switch allowed you to override this.

What steps did you use to install and configure httpd into 
/usr/local/apache2?
In your httpd source directory, what are the contents of the config.nice 
file?

You could review the following links:
- http://httpd.apache.org/docs/2.4/install.html#configure
- http://httpd.apache.org/docs/2.4/programs/configure.html

Take care,

Mike

On 3/31/2015 4:19 PM, Padmahas Bn wrote:
> Hello mike,
>
> Yes you are write I installed server first inside /usr and then inside 
> /usr/local/apache2 (installed by default when I used ./configure 
> without --prefix option). Even you are right about my manual un 
> installation.
>
> About the command you suggested with -V option, this is the result.
>
> Server version: Apache/2.4.12 (Unix)
> Server built:   Mar 31 2015 16:20:21
> Server's Module Magic Number: 20120211:41
> Server loaded:  APR 1.5.1, APR-UTIL 1.5.4
> Compiled using: APR 1.5.1, APR-UTIL 1.5.4
> Architecture:   64-bit
> Server MPM:     event
>   threaded:     yes (fixed thread count)
>     forked:     yes (variable process count)
> Server compiled with....
>  -D APR_HAS_SENDFILE
>  -D APR_HAS_MMAP
>  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
>  -D APR_USE_SYSVSEM_SERIALIZE
>  -D APR_USE_PTHREAD_SERIALIZE
>  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>  -D APR_HAS_OTHER_CHILD
>  -D AP_HAVE_RELIABLE_PIPED_LOGS
>  -D DYNAMIC_MODULE_LIMIT=256
>  -D HTTPD_ROOT="/usr"
>  -D SUEXEC_BIN="/usr/bin/suexec"
>  -D DEFAULT_PIDLOG="logs/httpd.pid"
>  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>  -D DEFAULT_ERRORLOG="logs/error_log"
>  -D AP_TYPES_CONFIG_FILE="conf/mime.types"
>  -D SERVER_CONFIG_FILE="conf/httpd.conf"
>
> I looked inside /usr/local/apache2/bin/apachectl, the HTTPD var set to
> *HTTPD='/usr/local/apache2/bin/httpd'
>
> *
> In parallel I also looked inside /usr/bin/apacheclt, there the HTTPD 
> var set to
>
> HTTPD='/usr/bin/httpd'. So I assume both of them pointing to their 
> respective directories.
>
> I tried the second command you suggested
> *sudo /usr/local/apache2/bin/apachectl -k start 
> -f**/usr/local/apache2/conf/httpd.conf
> *
>
> Good news The server started with usual warning message but Yes!!! it 
> is using the httpd.conf file which resides inside 
> /usr/local/apache2/conf/httpd.conf.
> The message it always show is,
> AH00558: httpd: Could not reliably determine the server's fully 
> qualified domain name, using 127.0.1.1. Set the 'ServerName' directive 
> globally to suppress this message
>
> *Now is there any way I can set apache to look inside 
> */usr/local/apache2/conf/httpd.conf*by default, by forgetting the 
> first installation inside /usr? Or should I always specify the 
> httpd.conf path as you suggested?
>
> *
> Thank you for the documentation links, I'm referring those links now.
>
> On Tue, Mar 31, 2015 at 10:11 PM, Mike Rumph <mike.rumph@oracle.com 
> <mailto:mike.rumph@oracle.com>> wrote:
>
>     Hello Padmahas,
>
>     It looks like your two installations of Apache httpd 2.4 are
>     conflicting with each other.
>     If I understand correctly, you first installed into /user and then
>     into /usr/local/apache2.
>     Then you tried to remove the /user installation by deleting files
>     manually.
>     (As you've seen, /user is not a good choice, because this is used
>     for many other things as well.)
>     It would probably help to do a fresh installation.
>     But let's try a few things first.
>
>     When tried *" sudo /usr/local/apache2/bin/apachectl -k start "*
>     It gave " *httpd: Could not open configuration file
>     /usr/conf/httpd.conf: No such file or directory ".*
>     You are probably wanting to use /usr/local/apache2/conf/httpd.conf
>     instead.
>
>     What results do you get from *sudo
>     /usr/local/apache2/bin/apachectl -V *  ?
>     Look inside */usr/local/apache2/bin/apachectl **
>     *What is the variable HTTPD set to?
>     You could try using *sudo /usr/local/apache2/bin/apachectl -k
>     start -f**/usr/local/apache2/conf/httpd.conf
>     *to override the config file location.
>     *
>     *See the following links for further options on the apachectl or
>     httpd commands:
>     - http://httpd.apache.org/docs/2.4/programs/apachectl.html
>     - http://httpd.apache.org/docs/2.4/programs/httpd.html
>
>     Thanks,
>
>     Mike Rumph
>
>
>     On 3/31/2015 3:36 AM, Padmahas Bn wrote:
>>     *If anyone finds this as a big question please let me know. I'll
>>     precise my problem.
>>
>>     Steps I followed:*
>>
>>     I installed apr and apr-utils package in the path *"/usr"* using
>>     the --prefix option.
>>
>>     Both were installed successfully. Hence I installed apache 2.4 to
>>     the same path ("/usr") using --prefix option while running
>>     *"./configure" .
>>
>>     *
>>     *Later I came to know if prefix is not mentioned for apache2.4
>>     installation, it will be installed inside /usr/local/apache2 by
>>     default.
>>
>>     *
>>     Hence I again installed without specifying --prefix option which
>>     does installed the apache2 into /usr/local/apache2.
>>
>>     Now I cd to /usr/local/apache2/bin and run *sudo apachectl -k
>>     start *and the apache server was started successfully. *Only
>>     later I came to know the server is running from the /usr files 
>>     installed at first time.
>>
>>     *
>>     Instead of having 2 installations I thought of removing the one
>>     installed inside /usr and deleted all files manually and
>>     carefully from all sub folders of /usr.
>>
>>     *Now when I run the server from /usr/local/apache2 using "* *sudo
>>     apachectl -k start " *it says *sudo: apachectl: command not found*
>>
>>     So I supplied full path using *" sudo
>>     /usr/local/apache2/bin/apachectl -k start "*
>>
>>     But its giving " *httpd: Could not open configuration file
>>     /usr/conf/httpd.conf: No such file or directory ".*
>>
>>     Thank you.
>
>


Mime
View raw message