apache2 service is maskedApache problem.Failed to startApache2 fails to start on boot with Ubuntu 16.04Apache, problem Failed to start LSB: Apache2 web serverHow to auto-start Apache & MySQL on Ubuntu 16.04 on system startup?Apache2 HTTP Ubuntu Won't Restartsite inaccesible when i run a vhostUbuntu 18.04 Error with apache2
Why choose the name "Morpheus" when it is the name of the Greek god of dreams
How much flexibility is normal for steel frames?
Intersection of sorted lists
How much tech advancement could be made out of modern processor appearing in 1980s?
What terminologies are used when ATC instructs a pilot to stop or proceed with his transmission?
How do oases form in the middle of the desert?
If a picture of a screen is a screenshot, what is a video of a screen?
What is the word for 'regarding the structure of a theory'?
Does it make sense to use strict equality constraint in optimization?
What should be done when the theory behind a PhD thesis turns out to be wrong?
A single word for "not allowed to be changed" or "must be this way"
Turing award papers
Codewars Solution - Functions acting on each other nested
Interval variables in MIP
Can I weaken a coil spring consisting of spring steel?
Is harmony based on intervals rather than chords?
Is the use of ellipsis "..." dismissive or rude?
Is there any difference between 旅行者 and 旅人?
I wasted the 6 years of my life and I don't know what should I do and how will I survive?
Why is dwarfism considered an advantage for jobs in space?
In 4 spatial dimensions, would motion under a central force law be confined to a plane?
Is Twinkle twinkle little star based on a drone/bourdon?
Where did prejudice against left-handed people originate from?
Realistically highlight theorem title and numbering
apache2 service is masked
Apache problem.Failed to startApache2 fails to start on boot with Ubuntu 16.04Apache, problem Failed to start LSB: Apache2 web serverHow to auto-start Apache & MySQL on Ubuntu 16.04 on system startup?Apache2 HTTP Ubuntu Won't Restartsite inaccesible when i run a vhostUbuntu 18.04 Error with apache2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I installed Apache 2 on ubuntu 19.04 desktop and was able to do a test access via localhost. I then discovered that the service was masked. I know how to unmask it, but I do not want to do so until I understand why it was masked and have corrected any error situation. How should I troubleshoot this situation? I am brand new to apache2. The output from systemctl is attached:
gossage@jgossage-XPS-8700:~$ sudo systemctl status apache2
● apache2.service
Loaded: masked (Reason: Unit apache2.service is masked.)
Active: inactive (dead)
apache2 19.04
|
show 5 more comments
I installed Apache 2 on ubuntu 19.04 desktop and was able to do a test access via localhost. I then discovered that the service was masked. I know how to unmask it, but I do not want to do so until I understand why it was masked and have corrected any error situation. How should I troubleshoot this situation? I am brand new to apache2. The output from systemctl is attached:
gossage@jgossage-XPS-8700:~$ sudo systemctl status apache2
● apache2.service
Loaded: masked (Reason: Unit apache2.service is masked.)
Active: inactive (dead)
apache2 19.04
Have you upgraded Ubuntu, Apache2 or have you experienced failure starting the service before?. Have you made changes to Apache2 configuration which resulted in errors?... all this could result in the service getting masked.
– Raffa
Sep 28 at 15:28
@Raffa I have definitely not upgraded the service and I was running with a vanilla configuration prior to adding local configuration.
– Jonathan
Sep 28 at 15:31
How did you install Apache2 and from which repository?
– Raffa
Sep 28 at 15:32
@Raffa I installed Apache via apt from the Canadian mirror. Actually some parts came from the local mirror and others from Ubuntu directly. I was using the default apt configuration.
– Jonathan
Sep 28 at 15:34
all looks normal. Did you start the Apache2 service prior to checking the status. You need to start the service for the first time after installation, which seems to have started successfully as you were able to test it on localhost. So why not reboot and check the service status again withsystemctl status apache2
before currying on with further steps.
– Raffa
Sep 28 at 15:40
|
show 5 more comments
I installed Apache 2 on ubuntu 19.04 desktop and was able to do a test access via localhost. I then discovered that the service was masked. I know how to unmask it, but I do not want to do so until I understand why it was masked and have corrected any error situation. How should I troubleshoot this situation? I am brand new to apache2. The output from systemctl is attached:
gossage@jgossage-XPS-8700:~$ sudo systemctl status apache2
● apache2.service
Loaded: masked (Reason: Unit apache2.service is masked.)
Active: inactive (dead)
apache2 19.04
I installed Apache 2 on ubuntu 19.04 desktop and was able to do a test access via localhost. I then discovered that the service was masked. I know how to unmask it, but I do not want to do so until I understand why it was masked and have corrected any error situation. How should I troubleshoot this situation? I am brand new to apache2. The output from systemctl is attached:
gossage@jgossage-XPS-8700:~$ sudo systemctl status apache2
● apache2.service
Loaded: masked (Reason: Unit apache2.service is masked.)
Active: inactive (dead)
apache2 19.04
apache2 19.04
edited Sep 28 at 15:51
Jonathan
asked Sep 28 at 15:19
JonathanJonathan
8903 gold badges10 silver badges22 bronze badges
8903 gold badges10 silver badges22 bronze badges
Have you upgraded Ubuntu, Apache2 or have you experienced failure starting the service before?. Have you made changes to Apache2 configuration which resulted in errors?... all this could result in the service getting masked.
– Raffa
Sep 28 at 15:28
@Raffa I have definitely not upgraded the service and I was running with a vanilla configuration prior to adding local configuration.
– Jonathan
Sep 28 at 15:31
How did you install Apache2 and from which repository?
– Raffa
Sep 28 at 15:32
@Raffa I installed Apache via apt from the Canadian mirror. Actually some parts came from the local mirror and others from Ubuntu directly. I was using the default apt configuration.
– Jonathan
Sep 28 at 15:34
all looks normal. Did you start the Apache2 service prior to checking the status. You need to start the service for the first time after installation, which seems to have started successfully as you were able to test it on localhost. So why not reboot and check the service status again withsystemctl status apache2
before currying on with further steps.
– Raffa
Sep 28 at 15:40
|
show 5 more comments
Have you upgraded Ubuntu, Apache2 or have you experienced failure starting the service before?. Have you made changes to Apache2 configuration which resulted in errors?... all this could result in the service getting masked.
– Raffa
Sep 28 at 15:28
@Raffa I have definitely not upgraded the service and I was running with a vanilla configuration prior to adding local configuration.
– Jonathan
Sep 28 at 15:31
How did you install Apache2 and from which repository?
– Raffa
Sep 28 at 15:32
@Raffa I installed Apache via apt from the Canadian mirror. Actually some parts came from the local mirror and others from Ubuntu directly. I was using the default apt configuration.
– Jonathan
Sep 28 at 15:34
all looks normal. Did you start the Apache2 service prior to checking the status. You need to start the service for the first time after installation, which seems to have started successfully as you were able to test it on localhost. So why not reboot and check the service status again withsystemctl status apache2
before currying on with further steps.
– Raffa
Sep 28 at 15:40
Have you upgraded Ubuntu, Apache2 or have you experienced failure starting the service before?. Have you made changes to Apache2 configuration which resulted in errors?... all this could result in the service getting masked.
– Raffa
Sep 28 at 15:28
Have you upgraded Ubuntu, Apache2 or have you experienced failure starting the service before?. Have you made changes to Apache2 configuration which resulted in errors?... all this could result in the service getting masked.
– Raffa
Sep 28 at 15:28
@Raffa I have definitely not upgraded the service and I was running with a vanilla configuration prior to adding local configuration.
– Jonathan
Sep 28 at 15:31
@Raffa I have definitely not upgraded the service and I was running with a vanilla configuration prior to adding local configuration.
– Jonathan
Sep 28 at 15:31
How did you install Apache2 and from which repository?
– Raffa
Sep 28 at 15:32
How did you install Apache2 and from which repository?
– Raffa
Sep 28 at 15:32
@Raffa I installed Apache via apt from the Canadian mirror. Actually some parts came from the local mirror and others from Ubuntu directly. I was using the default apt configuration.
– Jonathan
Sep 28 at 15:34
@Raffa I installed Apache via apt from the Canadian mirror. Actually some parts came from the local mirror and others from Ubuntu directly. I was using the default apt configuration.
– Jonathan
Sep 28 at 15:34
all looks normal. Did you start the Apache2 service prior to checking the status. You need to start the service for the first time after installation, which seems to have started successfully as you were able to test it on localhost. So why not reboot and check the service status again with
systemctl status apache2
before currying on with further steps.– Raffa
Sep 28 at 15:40
all looks normal. Did you start the Apache2 service prior to checking the status. You need to start the service for the first time after installation, which seems to have started successfully as you were able to test it on localhost. So why not reboot and check the service status again with
systemctl status apache2
before currying on with further steps.– Raffa
Sep 28 at 15:40
|
show 5 more comments
1 Answer
1
active
oldest
votes
It appears that you had an empty service file or you have a duplicate service file in /etc/systemd/system/
. This will usually get masked.
Check if the file /etc/systemd/system/apache2.service
exists. If so, remove it and proceed below.
Apache2 service file should exist in /lib/systemd/system/
. Please check if the file /lib/systemd/system/apache2.service
exists. If yes, check the content against this:
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/
[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort
[Install]
WantedBy=multi-user.target
If not, create the file and copy and paste the above content to it. Then try to enable the service by running:
sudo systemctl enable apache2
If successful, reboot your system
The service file was already present and a reboot was not necessary.
– Jonathan
Sep 28 at 17:18
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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/4.0/"u003ecc by-sa 4.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%2faskubuntu.com%2fquestions%2f1177310%2fapache2-service-is-masked%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
It appears that you had an empty service file or you have a duplicate service file in /etc/systemd/system/
. This will usually get masked.
Check if the file /etc/systemd/system/apache2.service
exists. If so, remove it and proceed below.
Apache2 service file should exist in /lib/systemd/system/
. Please check if the file /lib/systemd/system/apache2.service
exists. If yes, check the content against this:
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/
[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort
[Install]
WantedBy=multi-user.target
If not, create the file and copy and paste the above content to it. Then try to enable the service by running:
sudo systemctl enable apache2
If successful, reboot your system
The service file was already present and a reboot was not necessary.
– Jonathan
Sep 28 at 17:18
add a comment
|
It appears that you had an empty service file or you have a duplicate service file in /etc/systemd/system/
. This will usually get masked.
Check if the file /etc/systemd/system/apache2.service
exists. If so, remove it and proceed below.
Apache2 service file should exist in /lib/systemd/system/
. Please check if the file /lib/systemd/system/apache2.service
exists. If yes, check the content against this:
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/
[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort
[Install]
WantedBy=multi-user.target
If not, create the file and copy and paste the above content to it. Then try to enable the service by running:
sudo systemctl enable apache2
If successful, reboot your system
The service file was already present and a reboot was not necessary.
– Jonathan
Sep 28 at 17:18
add a comment
|
It appears that you had an empty service file or you have a duplicate service file in /etc/systemd/system/
. This will usually get masked.
Check if the file /etc/systemd/system/apache2.service
exists. If so, remove it and proceed below.
Apache2 service file should exist in /lib/systemd/system/
. Please check if the file /lib/systemd/system/apache2.service
exists. If yes, check the content against this:
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/
[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort
[Install]
WantedBy=multi-user.target
If not, create the file and copy and paste the above content to it. Then try to enable the service by running:
sudo systemctl enable apache2
If successful, reboot your system
It appears that you had an empty service file or you have a duplicate service file in /etc/systemd/system/
. This will usually get masked.
Check if the file /etc/systemd/system/apache2.service
exists. If so, remove it and proceed below.
Apache2 service file should exist in /lib/systemd/system/
. Please check if the file /lib/systemd/system/apache2.service
exists. If yes, check the content against this:
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/
[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort
[Install]
WantedBy=multi-user.target
If not, create the file and copy and paste the above content to it. Then try to enable the service by running:
sudo systemctl enable apache2
If successful, reboot your system
answered Sep 28 at 16:15
RaffaRaffa
2,0471 gold badge4 silver badges17 bronze badges
2,0471 gold badge4 silver badges17 bronze badges
The service file was already present and a reboot was not necessary.
– Jonathan
Sep 28 at 17:18
add a comment
|
The service file was already present and a reboot was not necessary.
– Jonathan
Sep 28 at 17:18
The service file was already present and a reboot was not necessary.
– Jonathan
Sep 28 at 17:18
The service file was already present and a reboot was not necessary.
– Jonathan
Sep 28 at 17:18
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1177310%2fapache2-service-is-masked%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
Have you upgraded Ubuntu, Apache2 or have you experienced failure starting the service before?. Have you made changes to Apache2 configuration which resulted in errors?... all this could result in the service getting masked.
– Raffa
Sep 28 at 15:28
@Raffa I have definitely not upgraded the service and I was running with a vanilla configuration prior to adding local configuration.
– Jonathan
Sep 28 at 15:31
How did you install Apache2 and from which repository?
– Raffa
Sep 28 at 15:32
@Raffa I installed Apache via apt from the Canadian mirror. Actually some parts came from the local mirror and others from Ubuntu directly. I was using the default apt configuration.
– Jonathan
Sep 28 at 15:34
all looks normal. Did you start the Apache2 service prior to checking the status. You need to start the service for the first time after installation, which seems to have started successfully as you were able to test it on localhost. So why not reboot and check the service status again with
systemctl status apache2
before currying on with further steps.– Raffa
Sep 28 at 15:40