apache 2 wont start

Hi , I have installed apache and all looked ok untill i try to run it and it wont start , after checking the status it gives this error

bi0:/home/mbi0 # rcapache2 status
Checking for httpd2:                                                                                                                                                                 unused
apache2.service - The Apache Webserver
          Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
          Active: failed (Result: exit-code) since Tue, 2013-05-07 00:41:34 CDT; 4min 5s ago
         Process: 15313 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DNO_DETACH -k graceful-stop (code=exited, status=1/FAILURE)
         Process: 15291 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DNO_DETACH -k start (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/apache2.service

May 07 00:41:34 mbi0.mbi0 start_apache2[15291]: [Tue May 07 00:41:34.747162 2013] [core:warn] [pid 15291] AH00117: Ignoring deprecated use of DefaultType in line 140 of /etc/apa.../httpd.conf.
May 07 00:41:34 mbi0.mbi0 start_apache2[15291]: AH00526: Syntax error on line 43 of /etc/apache2/errors.conf:
May 07 00:41:34 mbi0.mbi0 start_apache2[15291]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
May 07 00:41:34 mbi0.mbi0 systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
May 07 00:41:34 mbi0.mbi0 start_apache2[15313]: Module "authz_default" is not installed, ignoring.
May 07 00:41:34 mbi0.mbi0 start_apache2[15313]: Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
May 07 00:41:34 mbi0.mbi0 start_apache2[15313]: [Tue May 07 00:41:34.853439 2013] [core:warn] [pid 15313] AH00117: Ignoring deprecated use of DefaultType in line 140 of /etc/apa.../httpd.conf.
May 07 00:41:34 mbi0.mbi0 start_apache2[15313]: AH00526: Syntax error on line 43 of /etc/apache2/errors.conf:
May 07 00:41:34 mbi0.mbi0 start_apache2[15313]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
May 07 00:41:34 mbi0.mbi0 systemd[1]: Unit apache2.service entered failed state


Does any one know how to fix this to make it start, i would like to have it properly installed so i can learn on it and how to use it but i just cant get why i doesnt start, i hace seen the modules at the default directory so i just dont know why would it say they are missing , any help would be apreciated

You realy should try to bring us much more information, like:

. You do not say which version of openSUSE you use.

. You say you installed apache, but you do not tell how. You used YasT > Software> Software management and then fron the Patterns View you scrolled down to Server functionality and installed LAMP server?, or …?

. You say try to run it, but again you do not tell what you did. Did you use YaST > System > System Services (Runlevel) and started from there? Or …

You should not think that the way you do things is the only feasable way to do things, nor that it is the same way that all others “of course” do it. There are mosly many ways to achieve the same result in Unix/Linux and we, being not clairvoyant, can not know which way you walked.

First of all: How did you install apache2?
The version included in openSUSE works fine here. (and it does contain the module “authz_default”, which seems to be missing on your installation…)

Hello Guys i am using Opensuse 12.3

I installed just like you said, YasT > Software> Software management and then fron the Patterns View you scrolled down to Server functionality and installed LAMP server
after noticing that it didnt worked i un installed and reinstalled using terminal commands like zypper in apache2 , but got the same results.

I try to run it using YaST > System > System Services (Runlevel) and started from there , also i tryed to start it with the command in terminal rcpache2 Start

And which versions have you installed?
Please post the output of:

rpm -qa | grep apache

With the versions from the standard openSUSE repo I don’t get those error messages, and I do have “DefaultType text/plain” in line 140 of httpd.conf f.e.
My guess is you enabled an additional repo and have installed apache-2.4. The problem with this is that it is largely incompatible with 2.2’s config files…

Thanks for your help wolfi323

yeah seems like i do hve 2.4 instead of 2.2 may be with a repo I added and didnt noticed
here its the output you asked for

mbi0@mbi0:~> rpm -qa | grep apache
apache2-utils-2.4.3-14.1.x86_64
apache2-mod_php5-5.4.14-179.1.x86_64
apache2-example-pages-2.4.3-14.1.x86_64
apache2-prefork-2.4.3-14.1.x86_64
apache2-doc-2.4.3-14.1.noarch
apache2-2.4.3-14.1.x86_64
mbi0@mbi0:~> 

Well, regarding apache 2.4 I found those bugreports:
https://bugzilla.novell.com/show_bug.cgi?id=813705
https://bugzilla.novell.com/show_bug.cgi?id=748509

So I really would recommend to switch back to the 2.2 versions:

sudo zypper in -f apache2-utils-2.2.22 apache2-mod_php5-5.3.17 apache2-example-pages-2.2.22 apache2-prefork-2.2.22 apache2-doc-2.2.22 apache2-2.2.22

And you should remove that repo again.

After installing the 2.2 packages apache should start with the standard configuration and show a test page when you call “http://localhost/” in your browser.

Ok so i just did what you said Wolfi , and the result was this ; should i be worried about those warnings ?

The following packages are going to change vendor:
  apache2                obs://build.opensuse.org/home:smarty12 -> openSUSE
  apache2-doc            obs://build.opensuse.org/home:smarty12 -> openSUSE
  apache2-example-pages  obs://build.opensuse.org/home:smarty12 -> openSUSE
  apache2-mod_php5       obs://build.opensuse.org/home:smarty12 -> openSUSE
  apache2-prefork        obs://build.opensuse.org/home:smarty12 -> openSUSE
  apache2-utils          obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5                   obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-bz2               obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-ctype             obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-dom               obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-gd                obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-iconv             obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-json              obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-mbstring          obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-mcrypt            obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-mysql             obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-pdo               obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-sqlite            obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-tokenizer         obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-xmlreader         obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-xmlwriter         obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-zip               obs://build.opensuse.org/home:smarty12 -> openSUSE
  php5-zlib              obs://build.opensuse.org/home:smarty12 -> openSUSE


23 packages to downgrade, 23  to change vendor.
Overall download size: 6.2 MiB. After the operation, 5.4 MiB will be freed.
Continue? [y/n/?] (y): y

( 1/23) Installing: apache2-doc-2.2.22-10.4.1 ............................................................................................................................................[done]
( 2/23) Installing: apache2-example-pages-2.2.22-10.4.1 ..................................................................................................................................[done]
( 3/23) Installing: apache2-utils-2.2.22-10.4.1 ..........................................................................................................................................[done]
( 4/23) Installing: apache2-prefork-2.2.22-10.4.1 ........................................................................................................................................[done]
( 5/23) Installing: php5-5.3.17-3.1.1 ....................................................................................................................................................[done]
( 6/23) Installing: apache2-2.2.22-10.4.1 ................................................................................................................................................[done]
Additional rpm output:
warning: /etc/apache2/default-server.conf created as /etc/apache2/default-server.conf.rpmnew
/usr/sbin/suexec2: cannot verify root:root 0755 - not listed in /etc/permissions
Updating /etc/sysconfig/apache2...
looking for old 2.0 modules to be renamed...
Done.


( 7/23) Installing: apache2-mod_php5-5.3.17-3.1.1 ........................................................................................................................................[done]
( 8/23) Installing: php5-zlib-5.3.17-3.1.1 ...............................................................................................................................................[done]
( 9/23) Installing: php5-zip-5.3.17-3.1.1 ................................................................................................................................................[done]
(10/23) Installing: php5-xmlwriter-5.3.17-3.1.1 ..........................................................................................................................................[done]
(11/23) Installing: php5-tokenizer-5.3.17-3.1.1 ..........................................................................................................................................[done]
(12/23) Installing: php5-pdo-5.3.17-3.1.1 ................................................................................................................................................[done]
(13/23) Installing: php5-mcrypt-5.3.17-3.1.1 .............................................................................................................................................[done]
(14/23) Installing: php5-mbstring-5.3.17-3.1.1 ...........................................................................................................................................[done]
(15/23) Installing: php5-json-5.3.17-3.1.1 ...............................................................................................................................................[done]
(16/23) Installing: php5-iconv-5.3.17-3.1.1 ..............................................................................................................................................[done]
(17/23) Installing: php5-gd-5.3.17-3.1.1 .................................................................................................................................................[done]
(18/23) Installing: php5-dom-5.3.17-3.1.1 ................................................................................................................................................[done]
(19/23) Installing: php5-ctype-5.3.17-3.1.1 ..............................................................................................................................................[done]
(20/23) Installing: php5-bz2-5.3.17-3.1.1 ................................................................................................................................................[done]
(21/23) Installing: php5-sqlite-5.3.17-3.1.1 .............................................................................................................................................[done]
(22/23) Installing: php5-mysql-5.3.17-3.1.1 ..............................................................................................................................................[done]
(23/23) Installing: php5-xmlreader-5.3.17-3.1.1 ..........................................................................................................................................[done]

Also when trying to start i got this message :

mbi0:/home/mbi0 # rcapache2 start
redirecting to systemctl  start apache2
Warning: Unit file of apache2.service changed on disk, 'systemctl --system daemon-reload' recommended.


No, that’s ok.
The whole php5 was switched back to the standard repo as well, because we switched back apache2-mod_php5.

Also when trying to start i got this message :

mbi0:/home/mbi0 # rcapache2 start
redirecting to systemctl  start apache2
Warning: Unit file of apache2.service changed on disk, 'systemctl --system daemon-reload' recommended.

Do as the message says.
Running

systemctl --system daemon-reload

should fix this.
Or just reboot… :wink:

Ok, just rebooted to be sure, now this is what happens when i put the RCAPACHE2 STATUS in terminal

mbi0:/home/mbi0 # rcapache2 status
Checking for httpd2:                                                                                                                                                                 unused
apache2.service - apache
          Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
          Active: failed (Result: exit-code) since Tue, 2013-05-07 16:43:50 CDT
         Process: 635 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/apache2.service

May 07 16:43:46 mbi0.mbi0 start_apache2[635]: Module "unixd" is not installed, ignoring.
May 07 16:43:46 mbi0.mbi0 start_apache2[635]: Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
May 07 16:43:50 mbi0.mbi0 start_apache2[635]: Syntax error on line 102 of /etc/apache2/default-server.conf:
May 07 16:43:50 mbi0.mbi0 start_apache2[635]: Invalid command 'IncludeOptional', perhaps misspelled or defined by a module not included in the server configuration
May 07 16:43:50 mbi0.mbi0 systemd[1]: Failed to start apache.
May 07 16:43:50 mbi0.mbi0 systemd[1]: Unit apache2.service entered failed state


this happens when i try to manually start apache

mbi0:/home/mbi0 # rcapache2 start
redirecting to systemctl  start apache2
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -n' for details.
mbi0:/home/mbi0 # 

QUOTE=wolfi323;2554723]No, that’s ok.
The whole php5 was switched back to the standard repo as well, because we switched back apache2-mod_php5.

Do as the message says.
Running

systemctl --system daemon-reload

should fix this.
Or just reboot… ;)[/QUOTE]

Reinstall the LAMP pattern.
Use Yast to create a default setup
Use Yast - Network devices - Network settings, device, edit, in General tab set it to be activated on boot, not on cable connection.
Restart apache.

And post output of


systemctl status apache2.service

What is APACHE_MODULES set to in /etc/sysconfig/apache2? I guess the 2.4 packages have added the module “unixd” there that doesn’t exist on 2.2 yet.
Mine looks like this:

APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5 reqtimeout"
May 07 16:43:50 mbi0.mbi0 start_apache2[635]: Syntax error on line 102 of /etc/apache2/default-server.conf:May 07 16:43:50 mbi0.mbi0 start_apache2[635]: Invalid command 'IncludeOptional', perhaps misspelled or defined by a module not included in the server configuration

Ditto. Some leftover from 2.4.
Please delete /etc/apache2/default-server.conf and reinstall the apache2 package:

sudo rm /etc/apache2/default-server.conf
sudo zypper in -f apache2-2.2.22

You then have the default one again.

Or even better: delete the whole /etc/apache2 directory and /etc/sysconfig/apache2 and reinstall all apache packages:

sudo rm -r /etc/apache2 /etc/sysconfig/apache2
sudo zypper in -f apache2-utils-2.2.22 apache2-mod_php5-5.3.17 apache2-example-pages-2.2.22 apache2-prefork-2.2.22 apache2-doc-2.2.22 apache2-2.2.22

Then the whole apache2 config would be back to the (2.2) defaults…:wink:

KK done all of this and this its the output i got

mbi0:/home/mbi0 # systemctl status apache2.service
apache2.service - apache
          Loaded: loaded (/lib/systemd/system/apache2.service; disabled)
          Active: failed (Result: signal) since Tue, 2013-05-07 16:42:23 CDT; 6s ago
         Process: 3183 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=killed, signal=SEGV)
          CGroup: name=systemd:/system/apache2.service

May 07 16:42:18 mbi0.mbi0 start_apache2[3183]: Module "unixd" is not installed, ignoring.
May 07 16:42:18 mbi0.mbi0 start_apache2[3183]: Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
May 07 16:42:23 mbi0.mbi0 systemd[1]: Failed to start apache.
May 07 16:42:23 mbi0.mbi0 systemd[1]: Unit apache2.service entered failed state


Yes of course, the same as before.
But I now see a segfault in there that wasn’t there before. Maybe your package versions are mixed up now, because you haven’t removed that other repo yet…
Please do this:

sudo rm -r /etc/apache2 /etc/sysconfig/apache2
sudo zypper in -f apache2-utils-2.2.22 apache2-mod_php5-5.3.17 apache2-example-pages-2.2.22 apache2-prefork-2.2.22 apache2-doc-2.2.22 apache2-2.2.22

This deletes your apache2 config and brings back all your apache2 packages to the standard versions.
You then also have the standard config which should work…

Ok followed up all your indications and still having problems hehe starting to think somehow i really did a big mess with apache

so here its the Start and status output

mbi0:~ # rcapache2 start
redirecting to systemctl  start apache2
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -n' for details.
mbi0:~ # rcapache2 status
Checking for httpd2:                                                                                               unused
apache2.service - apache
          Loaded: loaded (/lib/systemd/system/apache2.service; disabled)
          Active: failed (Result: signal) since Tue, 2013-05-07 17:40:15 CDT; 5s ago
         Process: 4182 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=killed, signal=SEGV)
          CGroup: name=systemd:/system/apache2.service

May 07 17:40:15 mbi0.mbi0 systemd[1]: Failed to start apache.
May 07 17:40:15 mbi0.mbi0 systemd[1]: Unit apache2.service entered failed state
mbi0:~ # 


So the configuration seems to be ok now. But apache2 crashes.
As I said before, this is likely because reinstalling the LAMP Pattern installed some new packages and pulled them from that other repo.
Patterns only specify names of packages not specific versions. You now have a mixture of incompatible packages from two (or more) repos.
So first of all: Please remove that other repo! I did suggest that before: :wink:

AFAICS the only additional packages the LAMP pattern installs are apache2-mod_perl and apache2-mod_python, so maybe one of them is causing the crash.
Please remove them:

sudo zypper rm apache2-mod_perl apache2-mod_python

If apache2 still refuses to start then, please post the last lines of “journalctl -n” as suggested by systemd:

Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -n' for details.

And please post the output of:

zypper lr -u

and

rpm -qa | grep apache

I want to remove all repos except for the default ones , how can i do this ?? do you have any list of the default repoas ??

YaST->Software Repositories

Btw. you don’t have to remove them, you could also just disable them.
The default ones that should be enabled:

openSUSE-12.3(-Oss)
openSUSE-12.3-Non-Oss
openSUSE-12.3-Update
openSUSE-12.3-Update-Non-Oss

And you could count Packman to that list too.
Having additional repos isn’t necessarily bad, but it can lead to trouble. (esp. if you don’t know what you are doing…)

Hello guys sorry for so late response work has kept me away today but im on again
I just did this:

Disabled the non default reposs
Uninstalled the LAMP Pattern again
Deleted the Config files of apache
Reinstalled LAMP Patterns
Rebooted computer

and it worked or so it looks like.

Just something that roles out of my mind its why do i have 2 pacman reposs

here its a screen shot

So you have apache running now? Great. :wink:

Regarding your repos:

  • you should delete home:smarty12 (that caused your problems in the first place, because it contains apache-2.4)
  • enable one of the Packman repos, remove the other one (they are the same, anyway)
  • libdvdcss repository: you can enable this again, it just contains libdvdcss needed for playing encrypted DVDs
  • mozilla: you don’t really need that, because those updates come in via the normal update channel (i.e. OpenSUSE:12.3:Update)
  • KDE:Distro:Factory: are you sure you want to test the newest KDE packages? KDE 4.10.x updates will be released for all users, see above.
  • KDE:KDE3: decide for yourself. You may enable it. Should not cause any problems.
  • openSUSE:12.3-Update: the URL sounds fishy to me. Please remove it, you have the standard update repo anyway.
  • openSUSE-12.3-1.7: this points to your installation CD/DVD. If you don’t have that handy, you may want to remove/disable that.(“Main Repository (OSS)” contains all of that anyway but needs an internet connection of course)
  • openSUSE BuildService - games: shouldn’t cause any problems…

I hope I haven’t overlooked one… if so, please ask! :wink: