sogo httpd.conf

Issues related to applications and software problems
Post Reply
somig
Posts: 2
Joined: 2019/11/13 23:24:56

sogo httpd.conf

Post by somig » 2019/11/14 00:22:17

Hi everyone,

New on Centos, I am trying to configure Sogo.

I am faced with several errors from the httpd.conf file provided during the sogo installation.
However, I chose the version for cent 7.

Here is the original file in question:

Code: Select all

cat conf.d/SOGo.conf      
Alias /SOGo.woa/WebServerResources/ \
      /usr/lib64/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ \
      /usr/lib64/GNUstep/SOGo/WebServerResources/

<Directory /usr/lib64/GNUstep/SOGo/>
    AllowOverride None

    <IfVersion < 2.4>
        Order deny,allow
        Allow from all
    </IfVersion>
    <IfVersion >= 2.4>
        Require all granted
    </IfVersion>

    # Explicitly allow caching of static content to avoid browser specific behavior.
    # A resource's URL MUST change in order to have the client load the new version.
    <IfModule expires_module>
      ExpiresActive On
      ExpiresDefault "access plus 1 year"
    </IfModule>
</Directory>

## Uncomment the following to enable proxy-side authentication, you will then
## need to set the "SOGoTrustProxyAuthentication" SOGo user default to YES and
## adjust the "x-webobjects-remote-user" proxy header in the "Proxy" section
## below.
#
## For full proxy-side authentication:
#<Location /SOGo>
#  AuthType XXX
#  Require valid-user
#  SetEnv proxy-nokeepalive 1
#  Allow from all
#</Location>
#
## For proxy-side authentication only for CardDAV and GroupDAV from external
## clients:
#<Location /SOGo/dav>
#  AuthType XXX
#  Require valid-user
#  SetEnv proxy-nokeepalive 1
#  Allow from all
#</Location>

ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On

# When using CAS, you should uncomment this and install cas-proxy-validate.py
# in /usr/lib64/cgi-bin to reduce server overloading
#
# ProxyPass /SOGo/casProxy http://localhost/cgi-bin/cas-proxy-validate.py
# <Proxy http://localhost/app/cas-proxy-validate.py>
#   Order deny,allow
#   Allow from your-cas-host-addr
# </Proxy>

# Redirect / to /SOGo
#RedirectMatch ^/$ https://mail.yourdomain.com/SOGo

# Enable to use Microsoft ActiveSync support
# Note that you MUST have many sogod workers to use ActiveSync.
# See the SOGo Installation and Configuration guide for more details.
#
#ProxyPass /Microsoft-Server-ActiveSync \
# http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
# retry=60 connectiontimeout=5 timeout=360

ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0

<Proxy http://127.0.0.1:20000/SOGo>
## Adjust the following to your configuration
## and make sure to enable the headers module
<IfModule headers_module>
  RequestHeader set "x-webobjects-server-port" "443"
  SetEnvIf Host (.*) HTTP_HOST=$1
  RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}e" env=HTTP_HOST
  RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST

## When using proxy-side autentication, you need to uncomment and
## adjust the following line:
  RequestHeader unset "x-webobjects-remote-user"
#  RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER

  RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
</IfModule>

  AddDefaultCharset UTF-8

  Order allow,deny
  Allow from all
</Proxy>

# For Apple autoconfiguration
<IfModule rewrite_module>
  RewriteEngine On
  RewriteRule ^/.well-known/caldav/?$ /SOGo/dav [R=301]
  RewriteRule ^/.well-known/carddav/?$ /SOGo/dav [R=301]
</IfModule>
Several things do not pass "apache configtest" :
Lines starting with Alias;
<IfVersion> ... </IfVersion>
ProxyRequests Off;
SetEnv proxy-nokeepalive 1;
ProxyPreserveHost On;
ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0;
<Proxy http://127.0.0.1:20000/SOGo>;

And by removing the faulty elements, I get the error

Code: Select all

Could not reliably determine the server's fully qualified domain name, using fe80::7d14:5a50:f060:2177.
after restart httpd.service


For testing sogo on an ubuntu server, I managed to make it work with this kind of content:

Code: Select all

##<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

##	ServerAdmin webmaster@localhost
##	DocumentRoot /var/www/html

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

##	ErrorLog ${APACHE_LOG_DIR}/error.log
##	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
##</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

<VirtualHost 192.168.1.2:80>
   Servername localhost
   DocumentRoot /usr/lib/GNUstep/SOGo/WebServerResources/
   ErrorLog /var/log/apache2/error.log
   Customlog /var/log/apache2/access.log combined
   ServerSignature Off

   Alias /SOGo.woa/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/
   Alias /SOGo/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/
   AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2

   <Directory /usr/lib/GNUstep/SOGo/>
      AllowOverride None
#      Order deny,allow
#      Allow from all
      Require all granted
   </Directory>

   <LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*\.(jpg|png|gif|css|js)">
     SetHandler default-handler
   </LocationMatch>

   ProxyRequests Off
   SetEnv proxy-nokeepalive 1
   ProxyPreserveHost On
   ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0

   <Proxy http://127.0.0.1:20000/SOGo>
     RequestHeader set "x-webobjects-server-port" "80"
     RequestHeader set "x-webobjects-server-name" "localhost"
     RequestHeader set "x-webobjects-server-url" "http://127.0.0.1/SOGo"
     RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
     RequestHeader set "x-webobjects-remote-host" %{REMOTE_HOST}e env=REMOTE_HOST
     AddDefaultCharset UTF-8
#     Order allow,deny
#     Allow from all
     Require all granted     
   </Proxy>
   ## We use mod_rewrite to pass remote address to the SOGo proxy.
   # The remote address will appear in SOGo's log files and in the X-Forward
   # header of emails.
   RewriteEngine On
   RewriteRule ^/SOGo/(.*)$ /SOGo/$1 [env=REMOTE_HOST:%{REMOTE_ADDR},PT]

   Redirect permanent /index.html http://127.0.0.1/SOGo

</virtualhost>

<VirtualHost 192.168.1.2:8800>
  # this virtualhost is only for carddav on Mac and not tested very well
  RewriteEngine Off
  ProxyRequests Off
  SetEnv proxy-nokeepalive 1
  ProxyPreserveHost On
  ProxyPassInterpolateEnv On
  ProxyPass /principals http://127.0.0.1:20000/SOGo/dav/ interpolate
  ProxyPass /SOGo http://127.0.0.1:20000/SOGo interpolate
  ProxyPass / http://127.0.0.1:20000/SOGo/dav/ interpolate
  <Location />
#    Order allow,deny
#    Allow from all
    Require all granted    
  </Location>
  <Proxy http://127.0.0.1:20000>
    RequestHeader set "x-webobjects-server-port" "8800"
    RequestHeader set "x-webobjects-server-name" "localhost:8800"
    RequestHeader set "x-webobjects-server-url" "http://127.0.0.1/SOGo:8800"
    RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
    RequestHeader set "x-webobjects-remote-host" "127.0.0.1"
    AddDefaultCharset UTF-8
  </Proxy>
  ErrorLog /var/log/apache2/error.log
  Customlog /var/log/apache2/access.log combined
</VirtualHost>
Maybe it can be inspired?

some additional info that can help

Code: Select all

cat /var/log/httpd/error_log 
[Wed Nov 13 15:27:08.885576 2019] [core:notice] [pid 2075] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Nov 13 15:27:08.902745 2019] [suexec:notice] [pid 2075] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::7d14:5a50:f060:2177. Set the 'ServerName' directive globally to suppress this message
[Wed Nov 13 15:27:08.977080 2019] [lbmethod_heartbeat:notice] [pid 2075] AH02282: No slotmem from mod_heartmonitor
[Wed Nov 13 15:27:08.985735 2019] [mpm_prefork:notice] [pid 2075] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Wed Nov 13 15:27:08.985800 2019] [core:notice] [pid 2075] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Nov 13 15:27:56.220281 2019] [autoindex:error] [pid 2078] [client ::1:37476] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 15:30:50.400738 2019] [autoindex:error] [pid 2077] [client 192.168.1.2:44288] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 15:48:51.486062 2019] [autoindex:error] [pid 2076] [client 192.168.1.3:49688] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 16:05:45.652054 2019] [autoindex:error] [pid 2109] [client 192.168.1.3:49758] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 16:05:49.759373 2019] [autoindex:error] [pid 2078] [client 192.168.1.3:49760] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 16:05:50.777112 2019] [autoindex:error] [pid 2078] [client 192.168.1.3:49760] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 16:42:04.667272 2019] [autoindex:error] [pid 2077] [client 192.168.1.3:50034] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 21:01:59.153750 2019] [autoindex:error] [pid 2109] [client 192.168.1.3:35790] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 21:47:27.679225 2019] [autoindex:error] [pid 2080] [client 192.168.1.3:35914] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 22:23:46.803966 2019] [mpm_prefork:notice] [pid 2075] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Nov 13 22:23:47.965459 2019] [core:notice] [pid 7007] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Nov 13 22:23:47.967082 2019] [suexec:notice] [pid 7007] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::7d14:5a50:f060:2177. Set the 'ServerName' directive globally to suppress this message
[Wed Nov 13 22:23:48.060124 2019] [lbmethod_heartbeat:notice] [pid 7007] AH02282: No slotmem from mod_heartmonitor
[Wed Nov 13 22:23:48.071500 2019] [mpm_prefork:notice] [pid 7007] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Wed Nov 13 22:23:48.071589 2019] [core:notice] [pid 7007] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Nov 13 22:23:54.045912 2019] [autoindex:error] [pid 7010] [client 192.168.1.3:36000] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 22:31:02.914721 2019] [mpm_prefork:notice] [pid 7007] AH00171: Graceful restart requested, doing restart
[Wed Nov 13 22:31:02.952642 2019] [lbmethod_heartbeat:notice] [pid 7007] AH02282: No slotmem from mod_heartmonitor
[Wed Nov 13 22:31:02.952774 2019] [mpm_prefork:notice] [pid 7007] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Wed Nov 13 22:31:02.952788 2019] [core:notice] [pid 7007] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Nov 13 22:34:19.622140 2019] [mpm_prefork:notice] [pid 7007] AH00171: Graceful restart requested, doing restart
[Wed Nov 13 22:34:19.651821 2019] [lbmethod_heartbeat:notice] [pid 7007] AH02282: No slotmem from mod_heartmonitor
[Wed Nov 13 22:34:19.651921 2019] [mpm_prefork:notice] [pid 7007] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Wed Nov 13 22:34:19.651934 2019] [core:notice] [pid 7007] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Nov 13 23:12:00.478693 2019] [mpm_prefork:notice] [pid 7007] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Nov 13 23:12:01.558842 2019] [core:notice] [pid 7512] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Nov 13 23:12:01.560180 2019] [suexec:notice] [pid 7512] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Nov 13 23:12:01.578979 2019] [lbmethod_heartbeat:notice] [pid 7512] AH02282: No slotmem from mod_heartmonitor
[Wed Nov 13 23:12:01.586870 2019] [mpm_prefork:notice] [pid 7512] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Wed Nov 13 23:12:01.586951 2019] [core:notice] [pid 7512] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Nov 13 23:12:10.477616 2019] [autoindex:error] [pid 7517] [client 192.168.1.3:36054] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 23:12:14.617609 2019] [autoindex:error] [pid 7517] [client 192.168.1.3:36054] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 23:12:15.459201 2019] [autoindex:error] [pid 7517] [client 192.168.1.3:36054] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 23:12:16.124828 2019] [autoindex:error] [pid 7517] [client 192.168.1.3:36054] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 23:27:00.353023 2019] [autoindex:error] [pid 7513] [client 192.168.1.3:36120] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Wed Nov 13 23:57:26.757234 2019] [mpm_prefork:notice] [pid 7512] AH00170: caught SIGWINCH, shutting down gracefully

Code: Select all

journalctl -u httpd.service 
-- Logs begin at mer. 2019-11-13 14:56:53 CET, end at jeu. 2019-11-14 01:10:01 CET. --
nov. 13 15:27:08 centos systemd[1]: Starting The Apache HTTP Server...
nov. 13 15:27:08 centos httpd[2075]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::7d14:5a50:f060:2177. Set the 'Se
nov. 13 15:27:08 centos systemd[1]: Started The Apache HTTP Server.
nov. 13 22:23:46 centos systemd[1]: Stopping The Apache HTTP Server...
nov. 13 22:23:47 centos systemd[1]: Stopped The Apache HTTP Server.
nov. 13 22:23:47 centos systemd[1]: Starting The Apache HTTP Server...
nov. 13 22:23:47 centos httpd[7007]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::7d14:5a50:f060:2177. Set the 'Se
nov. 13 22:23:48 centos systemd[1]: Started The Apache HTTP Server.
nov. 13 22:31:02 centos systemd[1]: Reloading The Apache HTTP Server.
nov. 13 22:31:02 centos systemd[1]: Reloaded The Apache HTTP Server.
nov. 13 22:34:19 centos systemd[1]: Reloading The Apache HTTP Server.
nov. 13 22:34:19 centos systemd[1]: Reloaded The Apache HTTP Server.
nov. 13 23:12:00 centos systemd[1]: Stopping The Apache HTTP Server...
nov. 13 23:12:01 centos systemd[1]: Stopped The Apache HTTP Server.
nov. 13 23:12:01 centos systemd[1]: Starting The Apache HTTP Server...
nov. 13 23:12:01 centos systemd[1]: Started The Apache HTTP Server.
nov. 13 23:57:26 centos systemd[1]: Stopping The Apache HTTP Server...
nov. 13 23:57:27 centos systemd[1]: Stopped The Apache HTTP Server.
nov. 13 23:57:27 centos systemd[1]: Starting The Apache HTTP Server...
nov. 13 23:57:27 centos httpd[7924]: no listening sockets available, shutting down
nov. 13 23:57:27 centos httpd[7924]: AH00015: Unable to open logs
nov. 13 23:57:27 centos systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
nov. 13 23:57:27 centos kill[7926]: kill: cannot find process ""
nov. 13 23:57:27 centos systemd[1]: httpd.service: control process exited, code=exited status=1
nov. 13 23:57:27 centos systemd[1]: Failed to start The Apache HTTP Server.
nov. 13 23:57:27 centos systemd[1]: Unit httpd.service entered failed state.
nov. 13 23:57:27 centos systemd[1]: httpd.service failed.
nov. 14 00:01:06 centos systemd[1]: Starting The Apache HTTP Server...
nov. 14 00:01:06 centos httpd[7980]: no listening sockets available, shutting down
nov. 14 00:01:06 centos httpd[7980]: AH00015: Unable to open logs
nov. 14 00:01:06 centos systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
nov. 14 00:01:06 centos kill[7982]: kill: cannot find process ""
nov. 14 00:01:06 centos systemd[1]: httpd.service: control process exited, code=exited status=1
nov. 14 00:01:06 centos systemd[1]: Failed to start The Apache HTTP Server.
nov. 14 00:01:06 centos systemd[1]: Unit httpd.service entered failed state.

Code: Select all

netstat -ltnp
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat        PID/Program name    
tcp        0      0 127.0.0.1:20000         0.0.0.0:*               LISTEN      7482/sogod          
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      1523/slapd          
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      4321/sshd           
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      3329/postgres       
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1615/master         
tcp6       0      0 :::389                  :::*                    LISTEN      1523/slapd          
tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd           
tcp6       0      0 ::1:5432                :::*                    LISTEN      3329/postgres       
tcp6       0      0 ::1:25                  :::*                    LISTEN      1615/master
thank you in advance for the help.

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: sogo httpd.conf

Post by KernelOops » 2019/11/15 22:41:38

Maybe you should ask help from the sogo community? https://sogo.nu/support.html
--
R.I.P. CentOS :cry:
--

somig
Posts: 2
Joined: 2019/11/13 23:24:56

Re: sogo httpd.conf

Post by somig » 2019/11/21 11:51:25

I saw that, there is even a wiki.

Thank you and have a good day.

Post Reply