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-04-27, 18:15:57

Author Topic: Apache 2.4 not working correctly  (Read 13713 times)

0 Members and 1 Guest are viewing this topic.

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Apache 2.4 not working correctly
« on: 2016-01-12, 23:58:44 »
Hello,

Since the last update, apache 2.4 is driving me crazy, for some reason, it stop working, so I did several times sh /script/upcp -y, there's no issues. It installs the apache 2.2 normally, on the panel (also did sh /scripts/switch-apache httpd24) installs normally, but when I try to reset it (sh /scripts/restartweb-all) I get

Code: [Select]
sh /script/restart-web

*** Process for PHP-FPM service ***
  - Process: reload
Reloading php-fpm:                                         [  OK  ]
-------------------------------------------------------------------

*** Process for HTTPD service ***
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 with 'httpd': restart
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]
-------------------------------------------------------------------

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

It was working fine before today's update on kloxo.

I went to check the conf file on /etc/httpd/conf/httpd.conf and I noticed that is loading modules for the 2.2 version.

so I switched to 2.2 again and removed it manually by doing the command yum remove httpd* mod_* also did rm -rf /etc/httpd/ and finally sh /script/upcp -y. got the apache again on the 2.2 version but I switch to 2.4 with sh /scripts/switch-apache httpd24, I have the same problem, the config files are not changing.

And yes of course I did sh /script/fixweb ; sh /script/fixphp ; sh /script/restartweb in every time that I switched the apache version.
This is happening in all of my VPS that run kloxo mr, I was working perfectly before. :(

Here's the sysinfo:
Code: [Select]
A. Kloxo-MR: 7.0.0.b-2016011202
   - Web: hiawatha-10.0.0-f.6.mr.el6.i686
   - PHP: php54s-5.4.45-2.w6 (cgi mode)
B. Plateform:
   - OS: CentOS release 6.7 (Final) i686
   - Hostname: tegarte.com
C. Services:
   1. MySQL: MariaDB-server-10.0.23-1.el6.i686
   2. PHP:
      - Branch: php54-cli-5.4.45-1.ius.el6.i686
      - Multiple:
        * php52m-5.2.17-102.mr.el6
        * php53m-5.3.29-1.ius.el6
        * php54m-5.4.44-1.w6
        * php55m-5.5.28-1.ius.el6
        * php56m-5.6.12-1.ius.el6
      - Used: --Use PHP Branch--
   3. Httpd: httpd24u-2.4.18-1.ius.el6.i686
      - PHP Type: [unknown]
   4. Lighttpd: --uninstalled--
   5. Hiawatha: --unused--
   6. Nginx: --uninstalled--
   7. Cache: --uninstalled--
   8. Dns: bind-9.9.7-1.mr.el6.i386
   9. Qmail: qmail-toaster-1.03-1.3.55.mr.el6.i386
      - with: courier-imap-toaster-4.1.2-1.3.18.mr.el6.i386
D. Memory:
                total       used       free     shared    buffers     cached
   Mem:           512        366        145         21          0        264
   -/+ buffers/cache:        101        410
   Swap:          512         51        460
E. Disk Space:
   Filesystem      Size  Used Avail Use% Mounted on
   /dev/simfs      100G   15G   86G  15% /

And this is the first lines of httpd.conf:
Code: [Select]
ServerTokens OS

ServerRoot "/etc/httpd"

PidFile run/httpd.pid

# MR -- must be disable here because can not overrite! -- importance for proxy-to-apache
# Listen 80

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so

...

I really need Apache 2.4

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: Apache 2.4 not working correctly
« Reply #1 on: 2016-01-13, 00:01:34 »
And I meant: sh /script/restartweb and not sh /scripts/restartweb-all

For some reason I wasn't able to edit the post.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Apache 2.4 not working correctly
« Reply #2 on: 2016-01-13, 01:58:57 »
There something wrong with apach24 and want change their model.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: Apache 2.4 not working correctly
« Reply #3 on: 2016-01-13, 02:21:55 »
Exactly, have no idea why this is happening.
These are my repos:
Code: [Select]
rw-r--r-- 1 root root 1991 Aug  3 12:13 CentOS-Base.repo
-rw-r--r-- 1 root root  647 Aug  3 12:13 CentOS-Debuginfo.repo
-rw-r--r-- 1 root root  630 Aug  3 12:13 CentOS-Media.repo
-rw-r--r-- 1 root root 6259 Aug  3 12:13 CentOS-Vault.repo
-rw-r--r-- 1 root root  289 Aug  3 12:13 CentOS-fasttrack.repo
-rw-r--r-- 1 root root 8411 Jan 12 20:09 mratwork.repo
-rw-r--r-- 1 root root 8412 Jan 12 20:07 mratwork.repo.rpmsave
-rw-r--r-- 1 root root  219 Oct 21  2014 vz.repo

I'm out of ideas in how to fix this issue, also at this point I can't use any of the other servers, for completely different reasons, basically:

apache 2.2 = some of my websites are stuck at the default page (the one say that the IP address is not set, to go to admin home -> ip addresses (fixweb and fixphp doesn't fix it)
nginx = get's me an error saying that there's no switch_standard_ssl.conf
lighttpd = gives me a 403 error in all of my websites
hiawatcha = show page not found in all of my websites.

Once again I did fixweb, fixphp and restart-web everytime I changed the webserver.

And then there's apache 2.4, that for some reason with everything I did still keeps the apache 2.2 configs everywhere.

My head is about to explode, I'm trying to avoid doing a fresh install of my server, since everything is working fine, just the webserver.

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: Apache 2.4 not working correctly
« Reply #4 on: 2016-01-13, 02:39:59 »
There's some light at the end of the tunnel, basically, I discovered that after I do sh /script/switch-apache httpd24 the file /etc/httpd/conf/httpd.conf has the correct configuration for apache 2.4 (I know cause I'm comparing to an old backup) The file has 4KB and only I after I do sh /script/fixweb the httpd.conf reverts to the configuration of httpd.conf of apache 2.2 (with all those loadmodules lines). And the file size is 9KB

So why fixweb changing the config from apache 2.4 to apache 2.2 even though is the apache 2.4 that is installed?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Apache 2.4 not working correctly
« Reply #5 on: 2016-01-13, 03:46:53 »
Don't use httpd24 at this moment.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: Apache 2.4 not working correctly
« Reply #6 on: 2016-01-13, 10:45:03 »
I have to use httpd cause of the modules and also rebuild the htaccess files for every site I own with the modules that I want in each of them it will be a pain in the butt. And httpd 2.2 gets stuck on the page that say the "If you are seeing this page, it means that web has not been configured for this domain on this server."

With no changes on the server config, I can't get that to work.

Also I can get httpd 2.4 to work with a trick but this does not hold, basically after I switch to httpd 2.4, and before I do the fixweb command if I save the httpd.conf and replace it with the one that is generated after the fixweb httpd is working like a charm, the problem is I can't fixweb and that with kloxo will be hard with all the updates and the crons.

Don't you have any idea why fixweb reverts the httpd 2.4 to the 2.2 conf? This wasn't happening before and I was using httpd 2.4 for months without issues!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Apache 2.4 not working correctly
« Reply #7 on: 2016-01-13, 11:50:23 »
What's file(s) changed by fixweb that need by httpd 2.4?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: Apache 2.4 not working correctly
« Reply #8 on: 2016-01-13, 11:56:36 »
the one that I noticed is /etc/httpd/conf/httpd.conf (it could be more, but I have not noticed) basically after doing the switch-apache httpd24, that httpd.conf is set as supposed too to httpd 2.4, but after I do the fixweb the conf of that files reverts to the conf of httpd 2.2, so when I do the restart-web I get an error on the httpd.conf has the modules for the httpd 2.2 when I have httpd 2.4 installed.

Weirdest thing ever

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Apache 2.4 not working correctly
« Reply #9 on: 2016-01-13, 12:02:03 »
Using nginx-/hiawatha-proxy or apache standalone?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: Apache 2.4 not working correctly
« Reply #10 on: 2016-01-13, 12:12:59 »
Apache only, tried nginx, but also can't start it, cause it says the file /opt/configs/nginx/conf/globals/switch_standard_ssl.conf is missing:

Code: [Select]
[root@tegarte ~]# sh /script/restart-web

*** Process for PHP-FPM service ***
  - Process: reload
Reloading php-fpm:                                         [  OK  ]
-------------------------------------------------------------------

*** Process for NGINX service ***
Starting nginx: nginx: [emerg] open() "/opt/configs/nginx/conf/globals/switch_standard_ssl.conf" failed (2: No such file or directory) in /opt/configs/nginx/conf/defaults/init.conf:56
                                                           [FAILED]
  - Process: reload
Reloading nginx:                                           [FAILED]
-------------------------------------------------------------------

- For help, type '/script/restart-web [--help|-h]'
[root@tegarte ~]# sh /script/fixssl

- For help, type '/script/fixssl [--help|-h]'
- No argument supplied. Defaulting to localhost (master) servers

But again, I would prefer to have apache working, at this point, I don't care if it's 2.2 or 2.4
« Last Edit: 2016-01-13, 12:54:19 by tega »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Apache 2.4 not working correctly
« Reply #11 on: 2016-01-13, 13:03:58 »
Need update your Kloxo-MR and run cleanup but wait next update to 2016011301
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: Apache 2.4 not working correctly
« Reply #12 on: 2016-01-13, 14:03:56 »
Thanks, will do!

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: Apache 2.4 not working correctly
« Reply #13 on: 2016-01-14, 01:13:30 »
The down side is that the update did not fixed any of my problems, I will consider doing a fresh reinstalation in the future, but for now and this is the up side, is that I managed to get lighttpd working, even though I'm still strugling with getting it work with my SSL certs, I have the same .pem file with all my certs that I used on apache, but for some reason is not getting the chain correctly, but I think I will figure it out (I hope).

It's bummer not having apache working as before, but if I can get lighttpd to work in the same way I will be happy for now.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Apache 2.4 not working correctly
« Reply #14 on: 2016-01-14, 02:30:51 »
Step to use apache24, choose 'none' and then choose 'apache' with enable 'apache24'.

Make sure use httpd24 file exist in /etc/sysconfig/ and 'httpd -v' appear version 2.4.x. Use php-fpm_event instead other (like suphp).
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.053 seconds with 21 queries.

web stats analysis