configuring Apache in Opensuse 13.1 - some thing fails

hello

while setting up a lampp on opensuse 13.1 all goes well - but the apache-configuring task fails

see the details:



linux-70ce:/home/martin #  systemctl start apache2.service
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
linux-70ce:/home/martin # 
linux-70ce:/home/martin # systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since Mo 2014-03-10 00:29:06 CET; 42s ago
  Process: 15667 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 15649 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 15649 (code=exited, status=1/FAILURE)

Mär 10 00:29:06 linux-70ce.site start_apache2[15649]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/de... required)
Mär 10 00:29:06 linux-70ce.site systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Mär 10 00:29:06 linux-70ce.site start_apache2[15667]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/de... required)
Mär 10 00:29:06 linux-70ce.site systemd[1]: apache2.service: control process exited, code=exited status=1
Mär 10 00:29:06 linux-70ce.site systemd[1]: Failed to start The Apache Webserver.
Mär 10 00:29:06 linux-70ce.site systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
linux-70ce:/home/martin #                             

well all fails - what do you advice

That you type systemctl status apache2 **-l **or look at /var/log/apache2/error_log to see why the launch fails.

-l will unwrap the lines and lets you see what the error is.

hello dear miuku :wink:

thx alot for the quick reply:

well here againg the listing:

well i hope that we can find more things here in this snippets


linux-70ce:/home/martin # Passwort:
If 'Passwort:' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf Passwort:
linux-70ce:/home/martin # zypper in apache2 php5
Metadaten von Repository 'Packman' werden abgerufen ........................................................................................................................[fertig]
Zwischenspeicher für Repository 'Packman' wird erzeugt .....................................................................................................................[fertig]
Metadaten von Repository 'openSUSE 13.1 OSS Update' werden abgerufen .......................................................................................................[fertig]
Zwischenspeicher für Repository 'openSUSE 13.1 OSS Update' wird erzeugt ....................................................................................................[fertig]
Daten des Repositories laden ...
Installierte Pakete lesen ...
'apache2' ist bereits installiert.
Kein Aktualisierungskandidat für 'apache2-2.4.6-6.10.1.i586'. Die neueste Version ist bereits installiert.
'php5' ist bereits installiert.
Kein Aktualisierungskandidat für 'php5-5.4.20-4.1.i586'. Die neueste Version ist bereits installiert.
Paketabhängigkeiten auflösen ...
Keine auszuführenden Aktionen.
linux-70ce:/home/martin #

and this below




linux-70ce:/home/martin #  systemctl start apache2.service
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
linux-70ce:/home/martin #

Keine auszuführenden Aktionen.
linux-70ce:/home/martin #  systemctl start apache2.service
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
linux-70ce:/home/martin #
linux-70ce:/home/martin # systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since Mo 2014-03-10 00:29:06 CET; 42s ago
  Process: 15667 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 15649 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 15649 (code=exited, status=1/FAILURE)

Mär 10 00:29:06 linux-70ce.site start_apache2[15649]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/de... required)
Mär 10 00:29:06 linux-70ce.site systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Mär 10 00:29:06 linux-70ce.site start_apache2[15667]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/de... required)
Mär 10 00:29:06 linux-70ce.site systemd[1]: apache2.service: control process exited, code=exited status=1
Mär 10 00:29:06 linux-70ce.site systemd[1]: Failed to start The Apache Webserver.
Mär 10 00:29:06 linux-70ce.site systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
linux-70ce:/home/martin #


and last but not least - this here


                                                   
linux-70ce:/home/martin # systemctl status mysql.service                                                                                                                           
mysql.service - LSB: Start the MySQL database server                                                                                                                               
   Loaded: loaded (/etc/init.d/mysql)                                                                                                                                               
   Active: active (running) since Fr 2014-03-07 19:39:48 CET; 2 days ago                                                                                                           
   CGroup: /system.slice/mysql.service                                                                                                                                             
           +- 854 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql --pid-file=/var/run/mysql/mysqld.pid --socket=/var/run/mysql/mysql.sock --datadir=/var/lib/mysql       
           +-1095 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/lib/mysql/linux-70ce.site.err --pid-f...
                                                                                                                                                                                   
Mär 07 19:39:43 linux-70ce.site systemd[1]: Starting LSB: Start the MySQL database server...                                                                                       
Mär 07 19:39:48 linux-70ce.site mysql[694]: Starting service MySQL ..done
Mär 07 19:39:48 linux-70ce.site systemd[1]: Started LSB: Start the MySQL database server.
linux-70ce:/home/martin #



well i hope that we can find more things here in this snippets

No I meant you should login as root and type:
**
systemctl status apache2 -l**

and copy paste the result here. Notice the -l at the end.

Your probable error

Mär 10 00:29:06 linux-70ce.site start_apache2[15649]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/de… required)

Recommend you take a look at these two locations…

BTW - If you’re not doing anything particularly unusual, have you installed the YAST httpd configuration applet? Using it could avoid all sorts of headaches…

TSU

hello

many many thanks for the reply.

well - where can i find the recommended stuff: YAST httpd configuration applet

look forward to hear from you

greetings

hello again

did this and got the following results


martin@linux-70ce:~> systemctl status apache2 -l
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since So 2014-03-30 21:49:31 CEST; 1h 32min ago
  Process: 1250 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 777 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 777 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/apache2.service

martin@linux-70ce:~> 



well i guess that we have some errors here that lead the way … and help to find out whats going wrong

what do you think?

And why are you running it as user now when Miuku explicitely told you to login as root? (and you yourself always ran it as root before… :wink: )
This won’t help at all either.

So please post the output of:

sudo systemctl status apache2.service -l

And then have a look at those lines in that files it mentions and fix that syntax errors.
Maybe post that as well if you don’t know what’s wrong.

Martin, how did you install and configure the webserver? I’ve done dozens of webserver setups on openSUSE, never actually needed a terminal. I simply install the LAMP pattern, start Yast - Networkservices - HTTP server, configure defaults, done.

hi wolfi hi knurpht and tsu2

i did it this way

http://mntechblog.de/webserver-lamp-unter-opensuse-12-2-installieren/

guess that this way is not very good - and besides this i think that the above mentioned manuals do not fit the version 13.1

hmm what should i do now?

Right, there have been incompatible configuration changes in Apache 2.4, which is new in 13.1.

hmm what should i do now?

Read my previous post and do the things I suggested.
Especially post the complete error messages that Miuku asked for already in post#2.
Nobody is going to be able to help you without them.

You could also just delete the offending files and re-install “apache2”.
You would get back the default configuration then, which should at least let Apache start.

hello dear wolfi

many many thanks - great to hear from you



martin@linux-70ce:~> systemctl status apache2 -l 
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since Mi 2014-04-02 19:48:09 CEST; 24h ago
  Process: 1274 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 771 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 771 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/apache2.service

and the following:



martin@linux-70ce:~> 
martin@linux-70ce:~> 
martin@linux-70ce:~> sudo systemctl status apache2.service -l
root's password:
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since Mi 2014-04-02 19:48:09 CEST; 24h ago
  Process: 1274 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 771 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 771 (code=exited, status=1/FAILURE)
   CGroup: /system.slice/apache2.service

Apr 02 19:48:08 linux-70ce.site start_apache2[771]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/default-server.conf: No matches for the wildcard 'apache2-manual?conf' in '/etc/apache2/conf.d', failing (use IncludeOptional if required)
Apr 02 19:48:08 linux-70ce.site systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Apr 02 19:48:09 linux-70ce.site start_apache2[1274]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/default-server.conf: No matches for the wildcard 'apache2-manual?conf' in '/etc/apache2/conf.d', failing (use IncludeOptional if required)
Apr 02 19:48:09 linux-70ce.site systemd[1]: apache2.service: control process exited, code=exited status=1
Apr 02 19:48:09 linux-70ce.site systemd[1]: Failed to start The Apache Webserver.
Apr 02 19:48:09 linux-70ce.site systemd[1]: Unit apache2.service entered failed state.
martin@linux-70ce:~> 



well - what do you suggest - love to hear from you

greetings

Well, here you have your error messages:

According to those error messages, I would guess that you still have /etc/apache2/default-server.conf from a previous apache/openSUSE version. As I said there have been some incompatible changes in Apache 2.4.
Open /etc/apache2/default-server.conf in a text editor and change line 102 to “IncludeOptional” as the error message suggests.
But maybe better would be to just remove that file and reinstall the “apache2” package with “zypper in -f apache2”. You would get the default one then, which has considerably changed.

Hello. Yesterday I Upgraded my Suse 12.3 to 13.1. and i got this error.
I already delete and install apache2 Twice. I’ve been working on it. but I can not run apache2

Here is my error.


apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled)
   Active: failed (Result: exit-code) since Fri 2014-04-04 07:29:19 CST; 11s ago
  Process: 11052 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 11032 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 11032 (code=exited, status=1/FAILURE)

Apr 04 07:29:19 ftp130ch start_apache2[11032]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/default-server.conf: Syntax error on line 1 of /etc/apache2/conf.d/mod_evasive.conf: Cannot load /usr/lib64/apache2/mod_evasive20.so into server: /usr/lib64/apache2/mod_evasive20.so: cannot open shared object file: No such file or directory
Apr 04 07:29:19 ftp130ch systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Apr 04 07:29:19 ftp130ch start_apache2[11052]: httpd2-prefork: Syntax error on line 179 of /etc/apache2/httpd.conf: Syntax error on line 102 of /etc/apache2/default-server.conf: Syntax error on line 1 of /etc/apache2/conf.d/mod_evasive.conf: Cannot load /usr/lib64/apache2/mod_evasive20.so into server: /usr/lib64/apache2/mod_evasive20.so: cannot open shared object file: No such file or directory
Apr 04 07:29:19 ftp130ch systemd[1]: apache2.service: control process exited, code=exited status=1
Apr 04 07:29:19 ftp130ch systemd[1]: Failed to start The Apache Webserver.
Apr 04 07:29:19 ftp130ch systemd[1]: Unit apache2.service entered failed state.


Well, isn’t the error message clear enough?
mod_evasive20 cannot be loaded because it doesn’t exist.
So either remove that module from your configuration (APACHE_MODULES in /etc/sysconfig/apache2 maybe?), or install it (I think you want the package “apache2-mod_evasive”, included in the standard repo).

PS: You might remove /etc/apache2/conf.d/mod_evasive.conf in any case (but better keep a backup :wink: ), and install apache2-mod_evasive afterwards if you do want to use it. This should give you the default config file.

It exists


ftp130ch:/etc/apache2 # rpm -V  apache2-mod_evasive
.......T.  c /etc/apache2/conf.d/mod_evasive.conf
ftp130ch:/etc/apache2 # ^C
ftp130ch:/etc/apache2 # ls conf.d/
manual.conf       mod_fcgid.conf  mod_nss.conf   mod_security2.conf
mod_evasive.conf  mod_mono.conf   mod_perl.conf  php5.conf
ftp130ch:/etc/apache2 #

Of course does it exist, otherwise you wouldn’t get that error message… :wink:

But it is different from the one that is actually contained in “apache2-mod_evasive”.
It is a left-over from 12.3 and may not work any more. (changed configuration files normally don’t get overwritten on package installations/updates)

So remove it, as I said, and re-install apache2-mod_evasive with:

sudo zypper in -f apache2-mod_evasive

Or remove it and uninstall “apache2-mod_evasive” if you don’t want to use that.

PS:

This would actually mean that it is no different from the one included in the package (only the modification time has changed).

Apparently there’s a bug in the package.
The first line reads:

LoadModule evasive20_module /usr/lib64/apache2/mod_evasive20.so

but the package only contains /usr/lib64/apache2/mod_evasive24.so !

So try to change that manually. I guess you would also have to change the next line

<IfModule mod_evasive20.c>

to

<IfModule mod_evasive24.c>

as well, but I’m not sure about that.

And you should file a bug report at http://bugzilla.novell.com (same username/password as here).
Apparently the bug is in the package’s spec file, this should actually change those lines accordingly AFAICS.

As you said mister…


LoadModule evasive20_module /usr/lib64/apache2/mod_evasive20.s

/usr/lib64/apache2/modevasive24.s

and


<IfModule mod_evasive24.c>

and now it works very well.

thank you very much.

Before I was just changing -> /usr/lib64/apache2/modevasive20.s -> /usr/lib64/apache2/modevasive24.s

and I didn’t change <IfModule mod_evasive20.c> to -> <IfModule mod_evasive24.c>

hi many thanks

finally i did this

inux-70ce:/home/martin # 
linux-70ce:/home/martin # https://forums.opensuse.org/showthread.php/496144-configuring-Apache-in-Opensuse-13-1-some-thing-fails/page2
bash: https://forums.opensuse.org/showthread.php/496144-configuring-Apache-in-Opensuse-13-1-some-thing-fails/page2: Datei oder Verzeichnis nicht gefunden
linux-70ce:/home/martin # zypper in -f apache2
Daten des Repositories laden ...
Installierte Pakete lesen ...
Installation von 'apache2-2.4.6-6.15.1.i586' aus Repository 'openSUSE 13.1 OSS Update' wird erzwungen.
Paketabhängigkeiten auflösen ...

The following package is going to be reinstalled:
  apache2 

1 zu installierendes Paket.
Gesamtgröße des Downloads: 986,1 KiB. Kein zusätzlicher Speicherplatz wird nach dieser Operation belegt oder freigegeben.
Fortfahren? [j/n/? zeigt alle Optionen] (j): j
Paket apache2-2.4.6-6.15.1.i586 wird abgerufen                                                                                                 (1/1), 986,1 KiB (  3,3 MiB entpackt)
Abruf: apache2-2.4.6-6.15.1.i586.rpm .........................................................................................................................[fertig (610,2 KiB/s)]
(1/1) Installation von: apache2-2.4.6-6.15.1 ...............................................................................................................................[fertig]
Zusätzliche rpm-Ausgabe:
/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.



but i have no access to localhost < guess that i have still some configuration-work left.