OpenResty::Spec::Install::Apache - Configuring OpenResty.pm with Apache2 + mod_fcgid
# File /opt/apache2/conf/httpd.conf ... LoadModule fcgid_module modules/mod_fcgid.so LoadModule rewrite_module modules/mod_rewrite.so # the line below is optional: LoadModule deflate_module modules/mod_deflate.so DocumentRoot "/some/path/to/my/doc/root" RewriteEngine on RewriteRule ^/=/ /openresty.fcgi [QSA,L] AllowEncodedSlashes On <Location /> Options ExecCGI FollowSymLinks # the line below is optional: AddOutputFilter DEFLATE .fcgi .html .css .js AddHandler fcgid-script .fcgi Allow from all </Location> # File /some/path/to/my/doc/root/openresty.fcgi (remember chmod +x this!) #!/bin/sh exec openresty fastcgi
OpenResty.pm could be run as a FastCGI application with mod_fcgid or mod_fastcgi. See "SYNOPSIS" for sample configurations.
mod_fcgid
mod_fastcgi
Note that when using with mod_deflate to do gzip/deflate compression, it's recommended to set frontend.use_gzip to 0.
mod_deflate
frontend.use_gzip
0
Apache's AllowEncodedSlashes should be turned on or the following model request would result in a 404 error:
AllowEncodedSlashes
http://server:1234/=/model/urls/~/http%3A%2F%2Fwww.yahoo.cn%2Fhello%3Fabc%3D32
Agent Zhang (agentzh) <agentzh@yahoo.cn>.
<agentzh@yahoo.cn>
OpenResty::Spec::Install::Lighttpd, OpenResty::Spec::Install, OpenResty.
To install OpenResty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenResty
CPAN shell
perl -MCPAN -e shell install OpenResty
For more information on module installation, please visit the detailed CPAN module installation guide.