Link to home
Start Free TrialLog in
Avatar of burnedfaceless
burnedfaceless

asked on

Botched Apache2 on Ubuntu development machine. How to start fresh?

I had my Apache2 running good on my development machine.

I changed some site configurations and started running the noip.com's client, even though this is a production machine, to see if I could access it from the world wide web.

I tried to install it in terminal and came across the following error

brian@brian-XPS-13:~$ sudo service apache2 start
[sudo] password for brian: 
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
brian@brian-XPS-13:~$ sudo apt remove apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2-data apache2-utils
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  apache2
0 upgraded, 0 newly installed, 1 to remove and 121 not upgraded.
After this operation, 501 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 278612 files and directories currently installed.)
Removing apache2 (2.4.18-2ubuntu3.4) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
brian@brian-XPS-13:~$ sudo apt purge apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2-data apache2-utils
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  apache2*
0 upgraded, 0 newly installed, 1 to remove and 121 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 278564 files and directories currently installed.)
Removing apache2 (2.4.18-2ubuntu3.4) ...
Purging configuration files for apache2 (2.4.18-2ubuntu3.4) ...
dpkg: warning: while removing apache2, directory '/var/www/html' not empty so not removed
brian@brian-XPS-13:~$ clear


brian@brian-XPS-13:~$ sudo apt-get install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2
0 upgraded, 1 newly installed, 0 to remove and 121 not upgraded.
Need to get 0 B/86.8 kB of archives.
After this operation, 501 kB of additional disk space will be used.
Selecting previously unselected package apache2.
(Reading database ... 278408 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.18-2ubuntu3.4_amd64.deb ...
Unpacking apache2 (2.4.18-2ubuntu3.4) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up apache2 (2.4.18-2ubuntu3.4) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Fri 2017-08-11 07:39:23 EDT; 4ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 31021 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Aug 11 07:39:23 brian-XPS-13 apache2[31021]:  *
Aug 11 07:39:23 brian-XPS-13 apache2[31021]:  * The apache2 configtest failed.
Aug 11 07:39:23 brian-XPS-13 apache2[31021]: Output of config test was:
Aug 11 07:39:23 brian-XPS-13 apache2[31021]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-en...
Aug 11 07:39:23 brian-XPS-13 apache2[31021]: Action 'configtest' failed.
Aug 11 07:39:23 brian-XPS-13 apache2[31021]: The Apache error log may have more information.
Aug 11 07:39:23 brian-XPS-13 systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 11 07:39:23 brian-XPS-13 systemd[1]: Failed to start LSB: Apache2 web server.
Aug 11 07:39:23 brian-XPS-13 systemd[1]: apache2.service: Unit entered failed state.
Aug 11 07:39:23 brian-XPS-13 systemd[1]: apache2.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
brian@brian-XPS-13:~$ 

Open in new window


brian@brian-XPS-13:~$ systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Fri 2017-08-11 07:39:23 EDT; 7min ago
     Docs: man:systemd-sysv-generator(8)

Aug 11 07:39:23 brian-XPS-13 apache2[31021]:  *
Aug 11 07:39:23 brian-XPS-13 apache2[31021]:  * The apache2 configtest failed.
Aug 11 07:39:23 brian-XPS-13 apache2[31021]: Output of config test was:
Aug 11 07:39:23 brian-XPS-13 apache2[31021]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabl
Aug 11 07:39:23 brian-XPS-13 apache2[31021]: Action 'configtest' failed.
Aug 11 07:39:23 brian-XPS-13 apache2[31021]: The Apache error log may have more information.
Aug 11 07:39:23 brian-XPS-13 systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 11 07:39:23 brian-XPS-13 systemd[1]: Failed to start LSB: Apache2 web server.
Aug 11 07:39:23 brian-XPS-13 systemd[1]: apache2.service: Unit entered failed state.
Aug 11 07:39:23 brian-XPS-13 systemd[1]: apache2.service: Failed with result 'exit-code'.
lines 1-17

Open in new window


brian@brian-XPS-13:~$ journalctl -xe
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10974/fd/75: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10974/fd/76: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/5: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/7: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/8: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/9: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/10: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/37: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/38: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/69: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/70: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/71: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/72: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/73: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/74: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/75: Permission denied
Aug 11 07:40:28 brian-XPS-13 gnome-session[1969]: Cannot stat file /proc/10995/fd/76: Permission denied
lines 1565-15811581 (END)

Open in new window


If this question isn't answered today I may not be able to get on the computer for a few days. I will come back to it Monday at the latest.
ASKER CERTIFIED SOLUTION
Avatar of Dr. Klahn
Dr. Klahn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial