New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Projects
None yet
3 participants
@GuillaumeRossolini
Copy link

GuillaumeRossolini commented Dec 18, 2015

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

This comment has been minimized.

Copy link
Contributor

morlovich commented Jan 5, 2016

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

@GuillaumeRossolini

This comment has been minimized.

Copy link

GuillaumeRossolini commented Jan 5, 2016

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

Make sure mod_access_compat is loaded for Apache 2.4
so that "allow from" style of ACLs in our config works.
Ref: #1229
@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented Jan 25, 2016

Closed by 02e8f7e

jeffkaufman added a commit that referenced this issue Jan 25, 2016

Make sure mod_access_compat is loaded for Apache 2.4
so that "allow from" style of ACLs in our config works.
Ref: #1229

jeffkaufman added a commit that referenced this issue Jan 26, 2016

Make sure mod_access_compat is loaded for Apache 2.4
so that "allow from" style of ACLs in our config works.
Ref: #1229

jeffkaufman added a commit that referenced this issue Jan 26, 2016

Make sure mod_access_compat is loaded for Apache 2.4
so that "allow from" style of ACLs in our config works.
Ref: #1229
@GuillaumeRossolini

This comment has been minimized.

Copy link

GuillaumeRossolini commented Jan 26, 2016

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

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented Jan 26, 2016

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

This comment has been minimized.

Copy link

GuillaumeRossolini commented Jan 26, 2016

Excellent, that's just perfect. Many thanks!

jeffkaufman added a commit that referenced this issue Feb 11, 2016

Make sure mod_access_compat is loaded for Apache 2.4
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 join this conversation on GitHub. Already have an account? Sign in to comment