Bug when calling apachectl command (httpd)

Latest response

Hello,
We are using RH7
Linux web121 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

and have installed available apache httpd sw

[root@web121 conf]# yum list installed | grep httpd
httpd.x86_64 2.4.6-31.el7_1.1 @rhel-7-server-rpms
httpd-tools.x86_64 2.4.6-31.el7_1.1 @rhel-7-server-rpms

we need to use apachectl command in order to pass parameters to the apache service.

There is a bug with this command and it is returning the following response.
Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
If you want to pass extra arguments to httpd, edit the
/etc/sysconfig/httpd config file.

Can you please provide bugfix for this issue?
Thanks
Irene

Responses

What are you trying to pass to apachectl?

As the message implies, usage of apachectl has changed with systemd. The man apachectl page lists the only valid options. Other things must be defined in /etc/sysconfig/httpd or httpd.conf then the webserver restarted with apachectl restart or similar.

Hello

There is a section in the System Administrators' Guide for those migrating to the new release Notable Changes

If that is omitting something important for those familiar with the previous release, please let us know.

We need to start different instances of apache (httpd) in the same machine.
Each instance must have its own config file.

In RH6/http2.2 we were using these commands:
/usr/sbin/apachectl -f /ihs/apache-service-1/conf/httpd-service-1.conf -k start
/usr/sbin/apachectl -f /ihs/apache-service-2/conf/httpd-service-2.conf -k start
/usr/sbin/apachectl -f /ihs/apache-service-3/conf/httpd-service-3.conf -k start

So, we could start/stop the instances individually.
Thanks

We have never supported or recommended running multiple instances of Apache on the same system.

This sounds like a good use case for virtualization or containers.

Red Hat offer KVM, RHEV, and OpenStack virtualization methods.

Docker is fully supported for production usage as of RHEL 7.1, or you could look into a more full-featured container offering like OpenShift v3.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.