Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 16:18:53

Author Topic: Apache 2.4 config issue  (Read 5560 times)

0 Members and 1 Guest are viewing this topic.

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Apache 2.4 config issue
« on: 2016-07-17, 15:50:53 »
I can't use Apache 2.4 nor 2.2 with Hiawathaproxy on my new slave, following https://forum.mratwork.com/kloxo-mr-development/(info)-kloxo-mr-7-0-with-httpd-2-4-in-centos-6/.
[root@c6 ~]# sh /script/restart-web -y

Stopping php-fpm (PHP Used):                               [  OK  ]
Starting php-fpm (PHP Used):                               [  OK  ]
-------------------------------------------------------------------

Stopping Hiawatha web server:                              [  OK  ]
Starting Hiawatha web server:                              [  OK  ]
-------------------------------------------------------------------

Stopping httpd:                                            [FAILED]
Starting httpd: httpd: apr_sockaddr_info_get() failed for c6
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]
-------------------------------------------------------------------

- For help, type '/script/restart-web [--help|-h]'
[root@c6 ~]

I've chosen hiawatha proxy in switch program.

Config for Apache doesn't seem to use ports 30080/30443.
Also, how do i swtich to MPM event with Apache 2.4?
« Last Edit: 2016-07-17, 15:52:53 by fossxplorer (formerly 'Mella') »
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Apache 2.4 config issue
« Reply #1 on: 2016-07-17, 15:52:56 »
Inform here 'yum list installed httpd* mod*; dir -l /etc/httpd/conf.d'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Apache 2.4 config issue
« Reply #2 on: 2016-07-17, 16:03:11 »
[root@c6 ~]# yum list installed httpd* mod*; dir -l /etc/httpd/conf.d
Loaded plugins: fastestmirror, priorities, protectbase, replace
Loading mirror speeds from cached hostfile
 * base: mirror.sitbv.nl
 * extras: mirror.sitbv.nl
 * mratwork-epel: ftp.nluug.nl
 * mratwork-ius-stable: mirror.amsiohosting.net
 * mratwork-webtatic: uk.repo.webtatic.com
 * updates: mirrors.noction.com
0 packages excluded due to repository protections
Installed Packages
httpd24u.x86_64                            2.4.20-3.ius.el6                   @mratwork-ius-stable         
httpd24u-filesystem.noarch                 2.4.20-3.ius.el6                   @mratwork-ius-stable         
httpd24u-mod_session.x86_64                2.4.20-3.ius.el6                   @mratwork-ius-stable         
httpd24u-mod_ssl.x86_64                    1:2.4.20-3.ius.el6                 @mratwork-ius-stable         
httpd24u-tools.x86_64                      2.4.20-3.ius.el6                   @mratwork-ius-stable         
mod24u_fastcgi.x86_64                      2.4.7-4.mr.el6                     @mratwork-release-version-arch
mod24u_fcgid.x86_64                        2.3.9-1.mr.el6                     @mratwork-release-version-arch
mod24u_ruid2.x86_64                        0.9.8-3.mr.el6                     @mratwork-release-version-arch
mod24u_suphp.x86_64                        0.7.2-3.mr.el6                     @mratwork-release-version-arch
module-init-tools.x86_64                   3.9-25.el6                         @base                         
total 100
-rw-r--r--. 1 root root  366 Jun  6 21:50 README
-rw-r--r--. 1 root root  121 Jul 17 12:53 __version.conf
-rw-r--r--. 1 root root  111 Jul 17 12:53 _inactive_.conf
-rw-r--r--. 1 root root 2893 Jun  6 21:49 autoindex.conf
-rw-r--r--. 1 root root   78 Jul 17 12:53 define.conf.rpmsave
-rw-r--r--. 1 root root 1513 Feb 13 08:18 fastcgi.conf
-rw-r--r--. 1 root root  111 Jul 17 12:53 fastcgi.conf.rpmsave
-rw-r--r--. 1 root root  455 Feb 13 05:13 fcgid.conf
-rw-r--r--. 1 root root  111 Jul 17 12:53 fcgid.conf.rpmsave
-rw-r--r--. 1 root root  111 Jul 17 12:53 php.conf.rpmsave
-rw-r--r--. 1 root root  526 Jul 17 12:53 rpaf.conf
-rw-r--r--. 1 root root  111 Jul 17 12:53 ruid2.conf
-rw-r--r--. 1 root root 9430 Jun  6 21:50 ssl.conf
-rw-r--r--. 1 root root 9430 Jun  6 21:50 ssl.conf.rpmnew
-rw-r--r--. 1 root root  867 Jul 17 12:53 ssl.conf.rpmsave
-rw-r--r--. 1 root root 1683 Jun 18  2015 suphp.conf
-rw-r--r--. 1 root root  111 Jul 17 12:53 suphp.conf.rpmsave
-rw-r--r--. 1 root root 1252 Jan  2  2015 userdir.conf
-rw-r--r--. 1 root root  352 Apr 25  2012 webalizer.conf
-rw-r--r--. 1 root root  516 Jan  2  2015 welcome.conf
-rw-r--r--. 1 root root 1961 Jul 17 00:08 ~lxcenter.conf
[root@c6 ~]#
Kloxo-MR!

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Apache 2.4 config issue
« Reply #3 on: 2016-07-17, 16:54:24 »
[root@c6 ~]# sh /script/restart-web -y

Stopping php-fpm (PHP Used):                               [  OK  ]
Starting php-fpm (PHP Used):                               [  OK  ]
-------------------------------------------------------------------

Stopping spawn-fcgi:                                       [  OK  ]
Starting spawn-fcgi:                                       [  OK  ]
-------------------------------------------------------------------

Stopping Hiawatha web server:                              [  OK  ]
Starting Hiawatha web server:                              [  OK  ]
-------------------------------------------------------------------

Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 10 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/fcgid.conf: Cannot load modules/mod_fcgid.so into server: /etc/httpd/modules/mod_fcgid.so: undefined symbol: ap_unixd_setup_child
                                                           [FAILED]
-------------------------------------------------------------------


I think the Apache 2.4 installation is very wrong.
Any ideas @musfata?
Kloxo-MR!

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Apache 2.4 config issue
« Reply #4 on: 2016-07-17, 17:07:08 »
It's using Apache 2.2 config files for Apache 2.4!
How can i fix this?
Kloxo-MR!

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Apache 2.4 config issue
« Reply #5 on: 2016-07-17, 17:24:03 »
The problem is here:
[root@c6 ~]# cat /opt/configs/apache/conf/defaults/init.conf
### begin - web of initial - do not remove/modify this line


<IfVersion < 2.4>
   Define global::port 80
   Define global::portssl 443
   Define global::ip *

   Define port ${global::port}
   Define portssl ${global::portssl}
   Define ip ${global::ip}
</IfVersion>

<IfVersion >= 2.4>
   Define port 80
   Define portssl 443
   Define ip *
</IfVersion>

Listen ${ip}:${port}
Listen ${ip}:${portssl}

<IfVersion < 2.4>
   NameVirtualHost ${ip}:${port}
   NameVirtualHost ${ip}:${portssl}
</IfVersion>


### end - web of initial - do not remove/modify this line
[root@c6 ~]#

On master it looks like:

### begin - web of initial - do not remove/modify this line


<IfVersion < 2.4>
        Define global::port 30080
        Define global::portssl 30443
        Define global::ip 127.0.0.1

        Define port ${global::port}
        Define portssl ${global::portssl}
        Define ip ${global::ip}
</IfVersion>

<IfVersion >= 2.4>
        Include /opt/configs/apache/conf/globals/portnip.conf
</IfVersion>

Listen ${ip}:${port}
Listen ${ip}:${portssl}

<IfVersion < 2.4>
        NameVirtualHost ${ip}:${port}
        NameVirtualHost ${ip}:${portssl}
</IfVersion>

## MR -- ruid2 not work dor userdir!
..
..


This is the correct config.

Kloxo-MR!

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Apache 2.4 config issue
« Reply #6 on: 2016-07-17, 19:26:01 »
@mustafa, now i've almost spent 20 hours on trying to set up a slave to work at least to a degree where it's useful.

Now i did setup a new LXC container and installed fresh Kloxo-MR and it's the SAME ISSUE.
When you upgrade Apache to 2.4, the config is wrong.

This must be a bug introduced on the latest updates!
Kloxo-MR!

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Apache 2.4 config issue
« Reply #7 on: 2016-07-17, 19:34:08 »
On a fresh Kloxo-MR with Apache 2.4 (not working at all):
*** Restart services - BEGIN ***

Shutting down system logger:                               [  OK  ]
Starting system logger:                                    [  OK  ]
-------------------------------------------------------------------

 ERROR! MySQL server PID file could not be found!
Starting MySQL SUCCESS!
-------------------------------------------------------------------

Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]
-------------------------------------------------------------------

Stopping php-fpm (PHP Used):                               [  OK  ]
Starting php-fpm (PHP Used):                               [  OK  ]
-------------------------------------------------------------------

Stopping Hiawatha web server:                              [FAILED]
Starting Hiawatha web server: The default website has no hostname.
                                                           [FAILED]
-------------------------------------------------------------------

Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 13 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_authn_alias.so into server: /etc/httpd/modules/mod_authn_alias.so: cannot open shared object file: No such file or directory
                                                           [FAILED]
-------------------------------------------------------------------


*** Process for QMAIL service ***
Stopping qmail-toaster: svscan qmail logging.
qmail-send: no process killed
Starting qmail-toaster: svscan.
-------------------------------------------------------------------

- For help, type '/script/restart-mail [--help|-h]'
-------------------------------------------------------------------

Stopping pure-ftpd:                                        [FAILED]
Starting pure-ftpd: 421 Unable to switch capabilities : Operation not permitted
                                                           [FAILED]
-------------------------------------------------------------------

Stopping kloxo-phpcgi:                                     [  OK  ]
Starting kloxo-phpcgi ('php54s' in 'fpm' mode):            [  OK  ]
Stopping kloxo-hiawatha:                                   [  OK  ]
Starting kloxo-hiawatha:                                   [  OK  ]
-------------------------------------------------------------------
*** Restart services - END ***


*** Process Time: 00:00:00:19.19102 (dd:hh:mm:ss:xxxxxx) ***

[root@kloxo01 ~]#
Kloxo-MR!

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Apache 2.4 config issue
« Reply #8 on: 2016-07-17, 21:38:39 »
Seems i have fixed the issue using https://github.com/mustafaramadhan/kloxo/blob/722fab318ec56d0aa73dcbed31298954ba28326c/kloxo/pscript/switch-apache#L15

Dunno why that wasn't run when i switched to Apache 2.4 from the GUI..

@Mustafa, can you PLEASE take a look at moving existing customers from master to slave?
Kloxo-MR!

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo

Page created in 0.032 seconds with 18 queries.

web stats analysis