trying to start apache on 13.1 for owncloud

Hi experts

I am trying to setup my ownCloud service. Part of the instruction says that you need apache2 for the webserver.

I have verified from yast that I have apache2 (2.4.6) installed. But when I tried to start it I get this error:

 systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled)
   Active: failed (Result: exit-code) since Sat 2014-08-09 13:04:02 EDT; 10s ago
  Process: 9484 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 9465 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 9465 (code=exited, status=1/FAILURE)


Aug 09 13:04:02 linux-vjev start_apache2[9465]: AH00526: Syntax error on line 8 of /etc/apache2/sysconfig.d/global.conf:
Aug 09 13:04:02 linux-vjev start_apache2[9465]: ServerSignature: use one of: off | on | email
Aug 09 13:04:02 linux-vjev systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Aug 09 13:04:02 linux-vjev start_apache2[9484]: AH00526: Syntax error on line 8 of /etc/apache2/sysconfig.d/global.conf:
Aug 09 13:04:02 linux-vjev start_apache2[9484]: ServerSignature: use one of: off | on | email
Aug 09 13:04:02 linux-vjev systemd[1]: apache2.service: control process exited, code=exited status=1
Aug 09 13:04:02 linux-vjev systemd[1]: Failed to start The Apache Webserver.
Aug 09 13:04:02 linux-vjev systemd[1]: Unit apache2.service entered failed state.



So I went to global.conf:



linux-vjev:/home/user/Documents # cat /etc/apache2/sysconfig.d/global.conf
#
# Files in this directory are created at apache start time by /usr/sbin/rcapache2
# Do not edit them!
#


# see /etc/sysconfig/apache2


ServerSignature SSL
UseCanonicalName off
ServerTokens OS
LogLevel warn
CustomLog /var/log/apache2/access_log combined



and saw that the server sig is set to SSL. and that this is probably parsed from /etc/sysconfig/apache2.



## Type:        list(on,off,email)
## Default:     "on"
## ServiceReload: apache2
#
# Configures the footer on server-generated documents
# This correlates to the ServerSignature directive.
#
APACHE_SERVERSIGNATURE="SSL"



Now here is the part where I get confused. Because eventually I want to put the ownCloud on the web, so I thought I should enable SSL, so I found this guide about how to do it on suse 12.3:

http://www.unixmen.com/create-ssl-cetificates-in-opensuse-12-3/

and in it it said to put the serversignature as SSL.

and even when I change the setting from SSL to on I still get errors:

linux-vjev:/home/user/Documents # systemctl status apache2.service ......
Aug 09 13:16:38 linux-vjev start_apache2[9587]: AH00526: Syntax error on line 48 of /etc/apache2/ssl-global.conf:
Aug 09 13:16:38 linux-vjev start_apache2[9587]: SSLSessionCache: 'shmcb' session cache not supported (known names: ). M...cb?).
Aug 09 13:16:38 linux-vjev systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
 

can someone help me in figuring out what’s going on? I want to enable my apache with SSL.

APACHE_SERVERSIGNATURE="on"

Or Off.

To enable SSL module, you need to modify the server flags

APACHE_SERVER_FLAGS="-D SSL"


APACHE_SERVER_FLAGS="-D SSL"



server flag is set to -D SSL

Have you created a suitable .conf file - just enabling SSL in the server won’t do much - it’ll just load the module for Apache.

Look at /etc/apache2/vhosts.d/vhost-ssl.template for an example - you’ll also need to create certificates for Apache that you’ll use in that file (if the file is named something.conf it’ll be loaded when Apache starts), you can generate the keys with the gensslcert command ( gensslcert -h will give you help)

You can also take a peek at the SLES guide, it’s more or less the same;
https://www.suse.com/documentation/sles11/book_sle_admin/data/sec_apache2_ssl.html

actually i think i might have a bigger problem…

linux-vjev:/etc/apache2/vhosts.d # chkconfig -a apache2
apache2: unknown service


Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.




linux-vjev:/etc/apache2/vhosts.d # /etc/init.d/apache2 restart
bash: /etc/init.d/apache2: No such file or directory




But yast clears shows it installed.

where is my apache?

Apache2 is handled by systemd, not old SysV.

systemctl status apache2.service
systemctl start apache2

etc.

eh… running it in systemctl gives my initial post…

albeit with different errors:


E
Aug 09 13:16:38 linux-vjev start_apache2[9605]: AH00526: Syntax error on line 48 ...:
Aug 09 13:16:38 linux-vjev start_apache2[9605]: SSLSessionCache: 'shmcb' session ....
Aug 09 13:16:38 linux-vjev systemd[1]: apache2.service: control process exited, ...=1
Aug 09 13:16:38 linux-vjev systemd[1]: Failed to start The Apache Webserver.



i think i messed up somewhere, am going to just build a new vm and start from scratch.

found it!!

 /usr/sbin/rcapache2 status

linux-4rm8:/var # /usr/sbin/rcapache2 status
apache2.service - The Apache Webserver
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
Active: active (running) since Sat 2014-08-09 19:39:28 EDT; 7min ago
Main PID: 5084 (httpd2-prefork)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”
CGroup: /system.slice/apache2.service
├─5084 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYST…
├─5101 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYST…
├─5102 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYST…
├─5103 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYST…
├─5104 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYST…
├─5105 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYST…
└─5184 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYST…

Aug 09 19:39:28 linux-4rm8 systemd[1]: Started The Apache Webserver.
linux-4rm8:/var #

rcapache2 is just a shortcut to the systemctl command.