Apache (httpd) server fails to start on Redhat 7 (Amazon ec2 instance)
I'm having some trouble launching my Apache server from RHEL 7 (Amazon ec2). My larger goal is to host a Flask application from the ec2 instance using an Anaconda environment, but right now I'm just concerned with getting the httpd service started properly.
I've found a number of similar questions posted here, here, here, etc., but none seem to address the exact problem I'm experiencing.
I'm following this tutorial down to the last >
character, but the commands
sudo apachectl restart
and
sudo service httpd restart
both result in errors and direct me to examine systemctl status httpd.service
for more information. The output of that file is as follows:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-04-06 21:00:42 UTC; 4s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 32166 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 32165 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 32165 (code=exited, status=0/SUCCESS)
[long ec2 ip address] systemd[1]: Starting The Apache HTTP Server...
[long ec2 ip address] httpd[32165]: httpd (pid 28220) already running
[long ec2 ip address] kill[32166]: kill: cannot find process ""
[long ec2 ip address] systemd[1]: httpd.service: control process exited, code=exited status=1
[long ec2 ip address] systemd[1]: Failed to start The Apache HTTP Server.
[long ec2 ip address] systemd[1]: Unit httpd.service entered failed state.
[long ec2 ip address] systemd[1]: httpd.service failed.
The output of journalctl -xe
returns the same.
I've double and even triple-checked this post to confirm that my ec2 security group is configured correctly, which it is.
Some information about my system (don't know whether or not any of this will be helpful, but I figured it would be best to include it):
Apache Version: Apache/2.4.6 (Red Hat Enterprise Linux) configured
$ /usr/bin/python -V
Python 2.7.5
$ sudo yum install mod_wsgi
Package mod_wsgi-3.4-12.el7_0.x86_64 already installed and latest version
$ service httpd configtest
Syntax OK
$ sudo chkconfig --levels 235 httpd on
Note: Forwarding request to 'systemctl enable httpd.service'
The command sudo netstat -lnp | grep :80
returns tcp 0 0 :::0 :::* LISTEN 28220/httpd
I am now noticing that the file /etc/init.d/httpd
does not exist. Does that matter?
Normally, I do my best to look through the error logs and just figure out the cause of the problem myself, but the only error I can identify anywhere is in /var/log/httpd/error_log
, which reads:
AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
If this question has been asked before, please direct me to it. I've searched all over, with no luck thus far.
Cheers.
rhel apache-httpd amazon-ec2
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 2 more comments
I'm having some trouble launching my Apache server from RHEL 7 (Amazon ec2). My larger goal is to host a Flask application from the ec2 instance using an Anaconda environment, but right now I'm just concerned with getting the httpd service started properly.
I've found a number of similar questions posted here, here, here, etc., but none seem to address the exact problem I'm experiencing.
I'm following this tutorial down to the last >
character, but the commands
sudo apachectl restart
and
sudo service httpd restart
both result in errors and direct me to examine systemctl status httpd.service
for more information. The output of that file is as follows:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-04-06 21:00:42 UTC; 4s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 32166 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 32165 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 32165 (code=exited, status=0/SUCCESS)
[long ec2 ip address] systemd[1]: Starting The Apache HTTP Server...
[long ec2 ip address] httpd[32165]: httpd (pid 28220) already running
[long ec2 ip address] kill[32166]: kill: cannot find process ""
[long ec2 ip address] systemd[1]: httpd.service: control process exited, code=exited status=1
[long ec2 ip address] systemd[1]: Failed to start The Apache HTTP Server.
[long ec2 ip address] systemd[1]: Unit httpd.service entered failed state.
[long ec2 ip address] systemd[1]: httpd.service failed.
The output of journalctl -xe
returns the same.
I've double and even triple-checked this post to confirm that my ec2 security group is configured correctly, which it is.
Some information about my system (don't know whether or not any of this will be helpful, but I figured it would be best to include it):
Apache Version: Apache/2.4.6 (Red Hat Enterprise Linux) configured
$ /usr/bin/python -V
Python 2.7.5
$ sudo yum install mod_wsgi
Package mod_wsgi-3.4-12.el7_0.x86_64 already installed and latest version
$ service httpd configtest
Syntax OK
$ sudo chkconfig --levels 235 httpd on
Note: Forwarding request to 'systemctl enable httpd.service'
The command sudo netstat -lnp | grep :80
returns tcp 0 0 :::0 :::* LISTEN 28220/httpd
I am now noticing that the file /etc/init.d/httpd
does not exist. Does that matter?
Normally, I do my best to look through the error logs and just figure out the cause of the problem myself, but the only error I can identify anywhere is in /var/log/httpd/error_log
, which reads:
AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
If this question has been asked before, please direct me to it. I've searched all over, with no luck thus far.
Cheers.
rhel apache-httpd amazon-ec2
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
The error you posted said it could not start Apache as Apache was already running. Make sure there are no Apache processes running, then try to start the Apache service. It appears you are using systemd, so you would want to usesystemctl start httpd
to attempt to start the Apache service. Theservice
andchkconfig
commands are deprecated on a systemd machine and not used.
– GracefulRestart
Apr 7 '18 at 19:36
@GracefulRestart okay. when trying to verify that there are no Apache process already runningsudo systemctl status httpd
, I was given the same output that I listed forsystemctl status httpd.service
. Runningsudo systemctl start httpd
directs me to examinesystemctl status httpd.service
for more information. What now?
– nat5142
Apr 7 '18 at 19:59
You can runapachectl -t
to check httpd config. What happens when you try start httpd with firewalld disabled?
– Alxs
Apr 7 '18 at 22:54
@nat5142 if the error is still that there is an Apache process running, then you need to kill that process before you try to start Apache again. That running process is apparently not being handled by systemd,pgrep httpd
to figure out what the running process ID is.
– GracefulRestart
Apr 8 '18 at 0:41
@Alxs runningapachectl -t
doesn't output anything at all, actually. Any idea why that could be happening?
– nat5142
Apr 8 '18 at 0:45
|
show 2 more comments
I'm having some trouble launching my Apache server from RHEL 7 (Amazon ec2). My larger goal is to host a Flask application from the ec2 instance using an Anaconda environment, but right now I'm just concerned with getting the httpd service started properly.
I've found a number of similar questions posted here, here, here, etc., but none seem to address the exact problem I'm experiencing.
I'm following this tutorial down to the last >
character, but the commands
sudo apachectl restart
and
sudo service httpd restart
both result in errors and direct me to examine systemctl status httpd.service
for more information. The output of that file is as follows:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-04-06 21:00:42 UTC; 4s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 32166 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 32165 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 32165 (code=exited, status=0/SUCCESS)
[long ec2 ip address] systemd[1]: Starting The Apache HTTP Server...
[long ec2 ip address] httpd[32165]: httpd (pid 28220) already running
[long ec2 ip address] kill[32166]: kill: cannot find process ""
[long ec2 ip address] systemd[1]: httpd.service: control process exited, code=exited status=1
[long ec2 ip address] systemd[1]: Failed to start The Apache HTTP Server.
[long ec2 ip address] systemd[1]: Unit httpd.service entered failed state.
[long ec2 ip address] systemd[1]: httpd.service failed.
The output of journalctl -xe
returns the same.
I've double and even triple-checked this post to confirm that my ec2 security group is configured correctly, which it is.
Some information about my system (don't know whether or not any of this will be helpful, but I figured it would be best to include it):
Apache Version: Apache/2.4.6 (Red Hat Enterprise Linux) configured
$ /usr/bin/python -V
Python 2.7.5
$ sudo yum install mod_wsgi
Package mod_wsgi-3.4-12.el7_0.x86_64 already installed and latest version
$ service httpd configtest
Syntax OK
$ sudo chkconfig --levels 235 httpd on
Note: Forwarding request to 'systemctl enable httpd.service'
The command sudo netstat -lnp | grep :80
returns tcp 0 0 :::0 :::* LISTEN 28220/httpd
I am now noticing that the file /etc/init.d/httpd
does not exist. Does that matter?
Normally, I do my best to look through the error logs and just figure out the cause of the problem myself, but the only error I can identify anywhere is in /var/log/httpd/error_log
, which reads:
AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
If this question has been asked before, please direct me to it. I've searched all over, with no luck thus far.
Cheers.
rhel apache-httpd amazon-ec2
I'm having some trouble launching my Apache server from RHEL 7 (Amazon ec2). My larger goal is to host a Flask application from the ec2 instance using an Anaconda environment, but right now I'm just concerned with getting the httpd service started properly.
I've found a number of similar questions posted here, here, here, etc., but none seem to address the exact problem I'm experiencing.
I'm following this tutorial down to the last >
character, but the commands
sudo apachectl restart
and
sudo service httpd restart
both result in errors and direct me to examine systemctl status httpd.service
for more information. The output of that file is as follows:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-04-06 21:00:42 UTC; 4s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 32166 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 32165 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 32165 (code=exited, status=0/SUCCESS)
[long ec2 ip address] systemd[1]: Starting The Apache HTTP Server...
[long ec2 ip address] httpd[32165]: httpd (pid 28220) already running
[long ec2 ip address] kill[32166]: kill: cannot find process ""
[long ec2 ip address] systemd[1]: httpd.service: control process exited, code=exited status=1
[long ec2 ip address] systemd[1]: Failed to start The Apache HTTP Server.
[long ec2 ip address] systemd[1]: Unit httpd.service entered failed state.
[long ec2 ip address] systemd[1]: httpd.service failed.
The output of journalctl -xe
returns the same.
I've double and even triple-checked this post to confirm that my ec2 security group is configured correctly, which it is.
Some information about my system (don't know whether or not any of this will be helpful, but I figured it would be best to include it):
Apache Version: Apache/2.4.6 (Red Hat Enterprise Linux) configured
$ /usr/bin/python -V
Python 2.7.5
$ sudo yum install mod_wsgi
Package mod_wsgi-3.4-12.el7_0.x86_64 already installed and latest version
$ service httpd configtest
Syntax OK
$ sudo chkconfig --levels 235 httpd on
Note: Forwarding request to 'systemctl enable httpd.service'
The command sudo netstat -lnp | grep :80
returns tcp 0 0 :::0 :::* LISTEN 28220/httpd
I am now noticing that the file /etc/init.d/httpd
does not exist. Does that matter?
Normally, I do my best to look through the error logs and just figure out the cause of the problem myself, but the only error I can identify anywhere is in /var/log/httpd/error_log
, which reads:
AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
If this question has been asked before, please direct me to it. I've searched all over, with no luck thus far.
Cheers.
rhel apache-httpd amazon-ec2
rhel apache-httpd amazon-ec2
asked Apr 7 '18 at 18:46
nat5142nat5142
14
14
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
The error you posted said it could not start Apache as Apache was already running. Make sure there are no Apache processes running, then try to start the Apache service. It appears you are using systemd, so you would want to usesystemctl start httpd
to attempt to start the Apache service. Theservice
andchkconfig
commands are deprecated on a systemd machine and not used.
– GracefulRestart
Apr 7 '18 at 19:36
@GracefulRestart okay. when trying to verify that there are no Apache process already runningsudo systemctl status httpd
, I was given the same output that I listed forsystemctl status httpd.service
. Runningsudo systemctl start httpd
directs me to examinesystemctl status httpd.service
for more information. What now?
– nat5142
Apr 7 '18 at 19:59
You can runapachectl -t
to check httpd config. What happens when you try start httpd with firewalld disabled?
– Alxs
Apr 7 '18 at 22:54
@nat5142 if the error is still that there is an Apache process running, then you need to kill that process before you try to start Apache again. That running process is apparently not being handled by systemd,pgrep httpd
to figure out what the running process ID is.
– GracefulRestart
Apr 8 '18 at 0:41
@Alxs runningapachectl -t
doesn't output anything at all, actually. Any idea why that could be happening?
– nat5142
Apr 8 '18 at 0:45
|
show 2 more comments
The error you posted said it could not start Apache as Apache was already running. Make sure there are no Apache processes running, then try to start the Apache service. It appears you are using systemd, so you would want to usesystemctl start httpd
to attempt to start the Apache service. Theservice
andchkconfig
commands are deprecated on a systemd machine and not used.
– GracefulRestart
Apr 7 '18 at 19:36
@GracefulRestart okay. when trying to verify that there are no Apache process already runningsudo systemctl status httpd
, I was given the same output that I listed forsystemctl status httpd.service
. Runningsudo systemctl start httpd
directs me to examinesystemctl status httpd.service
for more information. What now?
– nat5142
Apr 7 '18 at 19:59
You can runapachectl -t
to check httpd config. What happens when you try start httpd with firewalld disabled?
– Alxs
Apr 7 '18 at 22:54
@nat5142 if the error is still that there is an Apache process running, then you need to kill that process before you try to start Apache again. That running process is apparently not being handled by systemd,pgrep httpd
to figure out what the running process ID is.
– GracefulRestart
Apr 8 '18 at 0:41
@Alxs runningapachectl -t
doesn't output anything at all, actually. Any idea why that could be happening?
– nat5142
Apr 8 '18 at 0:45
The error you posted said it could not start Apache as Apache was already running. Make sure there are no Apache processes running, then try to start the Apache service. It appears you are using systemd, so you would want to use
systemctl start httpd
to attempt to start the Apache service. The service
and chkconfig
commands are deprecated on a systemd machine and not used.– GracefulRestart
Apr 7 '18 at 19:36
The error you posted said it could not start Apache as Apache was already running. Make sure there are no Apache processes running, then try to start the Apache service. It appears you are using systemd, so you would want to use
systemctl start httpd
to attempt to start the Apache service. The service
and chkconfig
commands are deprecated on a systemd machine and not used.– GracefulRestart
Apr 7 '18 at 19:36
@GracefulRestart okay. when trying to verify that there are no Apache process already running
sudo systemctl status httpd
, I was given the same output that I listed for systemctl status httpd.service
. Running sudo systemctl start httpd
directs me to examine systemctl status httpd.service
for more information. What now?– nat5142
Apr 7 '18 at 19:59
@GracefulRestart okay. when trying to verify that there are no Apache process already running
sudo systemctl status httpd
, I was given the same output that I listed for systemctl status httpd.service
. Running sudo systemctl start httpd
directs me to examine systemctl status httpd.service
for more information. What now?– nat5142
Apr 7 '18 at 19:59
You can run
apachectl -t
to check httpd config. What happens when you try start httpd with firewalld disabled?– Alxs
Apr 7 '18 at 22:54
You can run
apachectl -t
to check httpd config. What happens when you try start httpd with firewalld disabled?– Alxs
Apr 7 '18 at 22:54
@nat5142 if the error is still that there is an Apache process running, then you need to kill that process before you try to start Apache again. That running process is apparently not being handled by systemd,
pgrep httpd
to figure out what the running process ID is.– GracefulRestart
Apr 8 '18 at 0:41
@nat5142 if the error is still that there is an Apache process running, then you need to kill that process before you try to start Apache again. That running process is apparently not being handled by systemd,
pgrep httpd
to figure out what the running process ID is.– GracefulRestart
Apr 8 '18 at 0:41
@Alxs running
apachectl -t
doesn't output anything at all, actually. Any idea why that could be happening?– nat5142
Apr 8 '18 at 0:45
@Alxs running
apachectl -t
doesn't output anything at all, actually. Any idea why that could be happening?– nat5142
Apr 8 '18 at 0:45
|
show 2 more comments
1 Answer
1
active
oldest
votes
SOLUTION: thanks to @GracefulRestart, I was able to determine the issue:
I think my mistake was in using the same security group for multiple ec2 instances (each of which I had now deactivated). Anyway, I ran pgrep httpd
, and saw a list of 7 numbers returned. Then ran ps -aux
to view the full list of processes that I had running. At the bottom of that list were all of the httpd processes returned from pgrep httpd
(most had a apache
as user
, but not all). I killed each of them using:
sudo kill -9 [PID]
Then ran sudo apachectl restart
, and it worked.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f436238%2fapache-httpd-server-fails-to-start-on-redhat-7-amazon-ec2-instance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
SOLUTION: thanks to @GracefulRestart, I was able to determine the issue:
I think my mistake was in using the same security group for multiple ec2 instances (each of which I had now deactivated). Anyway, I ran pgrep httpd
, and saw a list of 7 numbers returned. Then ran ps -aux
to view the full list of processes that I had running. At the bottom of that list were all of the httpd processes returned from pgrep httpd
(most had a apache
as user
, but not all). I killed each of them using:
sudo kill -9 [PID]
Then ran sudo apachectl restart
, and it worked.
add a comment |
SOLUTION: thanks to @GracefulRestart, I was able to determine the issue:
I think my mistake was in using the same security group for multiple ec2 instances (each of which I had now deactivated). Anyway, I ran pgrep httpd
, and saw a list of 7 numbers returned. Then ran ps -aux
to view the full list of processes that I had running. At the bottom of that list were all of the httpd processes returned from pgrep httpd
(most had a apache
as user
, but not all). I killed each of them using:
sudo kill -9 [PID]
Then ran sudo apachectl restart
, and it worked.
add a comment |
SOLUTION: thanks to @GracefulRestart, I was able to determine the issue:
I think my mistake was in using the same security group for multiple ec2 instances (each of which I had now deactivated). Anyway, I ran pgrep httpd
, and saw a list of 7 numbers returned. Then ran ps -aux
to view the full list of processes that I had running. At the bottom of that list were all of the httpd processes returned from pgrep httpd
(most had a apache
as user
, but not all). I killed each of them using:
sudo kill -9 [PID]
Then ran sudo apachectl restart
, and it worked.
SOLUTION: thanks to @GracefulRestart, I was able to determine the issue:
I think my mistake was in using the same security group for multiple ec2 instances (each of which I had now deactivated). Anyway, I ran pgrep httpd
, and saw a list of 7 numbers returned. Then ran ps -aux
to view the full list of processes that I had running. At the bottom of that list were all of the httpd processes returned from pgrep httpd
(most had a apache
as user
, but not all). I killed each of them using:
sudo kill -9 [PID]
Then ran sudo apachectl restart
, and it worked.
answered Apr 8 '18 at 1:03
nat5142nat5142
14
14
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f436238%2fapache-httpd-server-fails-to-start-on-redhat-7-amazon-ec2-instance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The error you posted said it could not start Apache as Apache was already running. Make sure there are no Apache processes running, then try to start the Apache service. It appears you are using systemd, so you would want to use
systemctl start httpd
to attempt to start the Apache service. Theservice
andchkconfig
commands are deprecated on a systemd machine and not used.– GracefulRestart
Apr 7 '18 at 19:36
@GracefulRestart okay. when trying to verify that there are no Apache process already running
sudo systemctl status httpd
, I was given the same output that I listed forsystemctl status httpd.service
. Runningsudo systemctl start httpd
directs me to examinesystemctl status httpd.service
for more information. What now?– nat5142
Apr 7 '18 at 19:59
You can run
apachectl -t
to check httpd config. What happens when you try start httpd with firewalld disabled?– Alxs
Apr 7 '18 at 22:54
@nat5142 if the error is still that there is an Apache process running, then you need to kill that process before you try to start Apache again. That running process is apparently not being handled by systemd,
pgrep httpd
to figure out what the running process ID is.– GracefulRestart
Apr 8 '18 at 0:41
@Alxs running
apachectl -t
doesn't output anything at all, actually. Any idea why that could be happening?– nat5142
Apr 8 '18 at 0:45