Skip to content
This repository was archived by the owner on Apr 21, 2023. It is now read-only.

pagespeed default config fails to load on 2.4 unless mod_access_compat is loaded #1229

Closed
GuillaumeRossolini opened this issue Dec 18, 2015 · 6 comments

Comments

@GuillaumeRossolini
Copy link

Hi,

The default config for the admin pages fails in pagespeed.conf with:

AH00526: Syntax error on line 345 of /usr/local/apache2/conf/pagespeed.conf
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration

This config is currently:

    <Location /pagespeed_admin>
        Order allow,deny
        Allow from localhost
        Allow from 127.0.0.1
        SetHandler pagespeed_admin
    </Location>
    <Location /pagespeed_global_admin>
        Order allow,deny
        Allow from localhost
        Allow from 127.0.0.1
        SetHandler pagespeed_global_admin
    </Location>

Which is ok for httpd-2.2.x.

For httpd-2.4.x however, it should be something along the lines of:

    <Location /pagespeed_admin>
        <RequireAny>
                Require ip 127.0.0.1
        </RequireAny>
        SetHandler pagespeed_admin
    </Location>
    <Location /pagespeed_global_admin>
        <RequireAny>
                Require ip 127.0.0.1
        </RequireAny>
        SetHandler pagespeed_global_admin
    </Location>

Regards,

@morlovich
Copy link
Contributor

Hmm, this works for me, probably because I have mod_access_compat loaded. May be easier to load that rather than the blocks...

@GuillaumeRossolini
Copy link
Author

I'm not sure this would be the safest path. If the folks at httpd thought the config syntax needed changing, I'd rather follow their example than add compatibility modules which are bound to cause headaches at some point.
Maybe it would be even easier (to maintain) to have 2 separate config files or folders, one for the 2.2 branch and another for the 2.4 branch, and have the main config file "Include" the correct one? After all, there are a few if/elses in some parts of the config files already.

morlovich added a commit that referenced this issue Jan 20, 2016
so that "allow from" style of ACLs in our config works.
Ref: #1229
@jeffkaufman
Copy link
Contributor

Closed by 02e8f7e

jeffkaufman pushed a commit that referenced this issue Jan 25, 2016
so that "allow from" style of ACLs in our config works.
Ref: #1229
jeffkaufman pushed a commit that referenced this issue Jan 26, 2016
so that "allow from" style of ACLs in our config works.
Ref: #1229
jeffkaufman pushed a commit that referenced this issue Jan 26, 2016
so that "allow from" style of ACLs in our config works.
Ref: #1229
@GuillaumeRossolini
Copy link
Author

I'm sorry, does it means that from now on, mod_access_compat is a required dependency?

@jeffkaufman
Copy link
Contributor

People using apache 2.4 have two options:

  • use mod_access_compat
  • manually modify the two small blocks in PageSpeed's default config to use the new Require syntax instead of the old allow/deny.

Either one works.

@GuillaumeRossolini
Copy link
Author

Excellent, that's just perfect. Many thanks!

jeffkaufman pushed a commit that referenced this issue Feb 11, 2016
so that "allow from" style of ACLs in our config works.
Ref: #1229
@crowell crowell changed the title Default admin pages config error with httpd-2.4.x pagespeed default config fails to load on 2.4 unless mod_access_compat is loaded Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants