Link to home
Start Free TrialLog in
Avatar of Vas
VasFlag for United States of America

asked on

Apache 2.4 on CentOS 6

I installed Apache 2.4 on a min. installation of CentOS (in other words, this was a fresh Apache installation, not an upgrade from 2.2, there is no previous Apache on the box - I think...)

I'm a little green on this in general, but I see that Apache 2.4 got installed to:
/opt/rh/httpd24/root/var/www

(this was installed using repo http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo)

and I need to stop/start/restart using command:
service httpd24-httpd {start|stop|restart}


The complication is:

1) I'm trying to install some modules, for example following the steps here for mod_pagespeed:
http://wpguru.co.uk/2014/03/how-to-install-apache-mod_pagespeed-on-centos-with-plesk/

it places its files here for example:
/etc/httpd/conf.d/pagespeed.conf


Should I be creating some kind of sym link to redirect attempts of accessing /etc/httpd/ to redirect to /opt/rh/httpd24/..<something>?

For example the Apache 2.6 conf file exists at /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf

This is the file structure for the 2.4 httpd directory:

# ls -al /opt/rh/httpd24/root/etc/httpd
total 20
drwxr-xr-x.  5 root root 4096 May  1 10:57 .
drwxr-xr-x. 11 root root 4096 May  1 10:57 ..
drwxr-xr-x.  2 root root 4096 May  1 10:57 conf
drwxr-xr-x.  2 root root 4096 May  1 10:57 conf.d
drwxr-xr-x.  2 root root 4096 May  1 10:57 conf.modules.d
lrwxrwxrwx.  1 root root   34 May  1 10:57 logs -> /opt/rh/httpd24/root/var/log/httpd
lrwxrwxrwx.  1 root root   44 May  1 10:57 modules -> /opt/rh/httpd24/root/usr/lib64/httpd/modules
lrwxrwxrwx.  1 root root   34 May  1 10:57 run -> /opt/rh/httpd24/root/var/run/httpd



2) The other issue is I plan to install Plesk.  Has anyone installed Plesk on Apache 2.4? Does it detect this non-standard location of Apache?



Back to the module installation, the module isn't working and I don't know if I should copy the files over (but I don't want to keep having to do that)  or what the best practice is (create a sym link, but not sure what to link to what)

I do see some files here since Apache 2.2 wasn't installed I don't know if these files just come default with CentOS min build or where they came from.  The machine was built very recently (in the last month)



# ls -al /etc/httpd/conf
total 60
drwxr-xr-x. 2 root root  4096 May  1 11:12 .
drwxr-xr-x. 4 root root  4096 May  1 11:12 ..
-rw-r--r--. 1 root root 34418 Aug 15  2014 httpd.conf
-rw-r--r--. 1 root root 13139 Oct 16  2014 magic



Thanks in advance for any help or clarification.
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

this was installed using repo...

you don't need to configure another repo
out of the box you can do yum install httpd

and I need to stop/start/restart using command

using the default repo it would be service httpd <command>

I don't know if these files just come default with CentOS...

CentOS comes default with 2.4
if 2.2 is/was there it was done manually

Has anyone installed Plesk on Apache 2.4?

i have not

the module isn't working and I don't know if I should copy the files over

shouldn't do that especially if it came from an earlier apache version as modules won't be compatible
Avatar of Vas

ASKER

Apache 2.4 is not available from CentOS's repo, in fact after your reply I tested it on a restored VM,  and it's definitely Apache/2.2.15 (CentOS) that gets installed if you do a "yum install httpd"

I attached a screenshot,  and also I confirmed by the default apache page and using curl to view the headers from an external machine.


User generated image
What is the problem you are attempting to solve? Apache 2.2 is still supported and there is no diffference between that and 2.4 that you can see.
ASKER CERTIFIED SOLUTION
Avatar of Vas
Vas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Vas

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for nathaliev's comment #a40791698

for the following reason:

The best solution was just going with Cent OS 7, instead of 6
In the meantime I installed Debian 8 which has 2.4
It does not help your problem of getting Apache 2.4 on CentOS 6. Apache 2.4 is part of jBoss EAP from redhat.