-
Notifications
You must be signed in to change notification settings - Fork 361
Generate configuration files for apache and nginx #141
Conversation
This is a work in progress. The aims to port pagespeed.debug.conf to a new generic format, from which specific configurations can be generated for apache, nginx, and others.
this saves some work, before refactoring out some common logic in the templates
- a more structured approach to rewriting pagespeed.debug.conf - an alternate approach to translating to an apache configuration
- fill in more details - add new nginx translation
…nto oschaaf-generate-config
test/genconf/pagespeed.debug.pyconf
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually a problem? Do we need the #ifndef ALL_DIRECTIVES
everywhere? They make it really hard to read. What happens if we just include the directive twice? Or move ALL_DIRECTIVES
into its own vhost or something? Or even wrap everything in an giant #ifndef ALL_DIRECTIVES
except and then a separate #ifdef ALL_DIRECTIVES
at the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffkaufman
Currently, including the a directive with the same name twice will result in an error noting that it is already defined ( an array of values can be used to specify multiple values for the same directive instead).
Moving the ALL_DIRECTIVES to a separate vhost sounds like a good idea to me, do you want me to do that?
extend prefix format; use fewer ifdefs and more prefixes
To test the config system I ran:
This turned up some simple errors, which I fixed: #169 Two errors remain which weren't easily fixed:
It would be nice if errors could be accompanied by the line number the error's on. |
That would be great. Or, if you'd rather, I can do it. |
…ation fix some template errors
…rectives Move ALL_DIRECTIVES into its own VHOST
@jeffkaufman That should be very useful, but it's a little harder then I thought initially, because we have semi-inheritance for locations and header directives in .pyconf. |
…mbers generate-config: display line numbers in errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is apache-only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeffkaufman: "This is apache-only"
Do you think it would be feasible to have something like http://wiki.nginx.org/SimpleCGI generated for nginx at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably. For now I'd be inclined to mark it as apache only, and then as I start going through apache_system_test.sh
I can fix more and more of the apache-only config stuff to be general.
…o other templates
…ilable to other templates" This reverts commit dc97039.
…orted-directives generate config: don't filter unsupported pagespeed directives in .pyconf files
Next steps:
And then, with the system tests running, we'll have lots of bugs to look into. |
When this comes in it's coming via the mod_pagespeed codebase, not via here. |
This pull implements generating apache and nginx configuration files for testing purposes
You can generate an nginx configuration file using:
This can be tested using, for example:
An apache configuration file can be generated using