Apache mod-rails source download

Apache mod-rails source download

apache mod-rails source download

Installing Passenger + Apache from source tarball · Step 1: download and extract tarball · Step 2: install Ruby. PHP Hosting · Java Hosting · Python Hosting · Node.js Hosting · Perl Hosting · Ruby on Rails These additional Apache modules are referred to as​. mod_ruby is a module that embeds the Ruby interpreter into the Apache web server to allow Please help to establish notability by citing reliable secondary sources that are independent of the topic and Download as PDF · Printable version. apache mod-rails source download

Apache mod-rails source download - share

mod_xsendfile for Apache2/Apache2.2

Overview

mod_xsendfile is a small Apache2 module that processes X-SENDFILE headers registered by the original output handler.

If it encounters the presence of such header it will discard all output and send the file specified by that header instead using Apache internals including all optimizations like caching-headers and sendfile or mmap if configured.

It is useful for processing script-output of e.g. php, perl or any cgi.

Useful?

Yep, it is useful.

  • Some applications require checking for special privileges.
  • Other have to lookup values first (e.g.. from a DB) in order to correctly process a download request.
  • Or store values (download-counters come into mind).
  • etc.

Benefits

  • Uses apache internals
  • Optimal delivery through sendfile and mmap (if available).
  • Sets correct cache headers such as Etag and If-Modified-Since as if the file was statically served.
  • Processes cache headers such as If-None-Match or If-Modified-Since.
  • Support for ranges.

Download

Installation

  1. Grab the source.
  2. Compile and install
  3. Restart apache
  4. That's all.

Configuration

XSendFile

DescriptionEnables or disables header processing
SyntaxXSendFile on|off
DefaultXSendFile off
Contextserver config, virtual host, directory, .htaccess

Setting will enable processing.

The file specified in header will be sent instead of the handler output.

If the response lacks the header nothing is done.

XSendFileIgnoreEtag

DescriptionIgnore script provided Etag headers
SyntaxXSendFileIgnoreEtag on|off
DefaultXSendFileIgnoreEtag off
Contextserver config, virtual host, directory, .htaccess

Setting will ignore all ETag headers the original output handler may have set.
This is helpful for applications that will generate such headers even for empty content.

XSendFileIgnoreLastModified

DescriptionIgnore script provided LastModified headers
SyntaxXSendFileIgnoreLastModified on|off
DefaultXSendFileIgnoreLastModified off
Contextserver config, virtual host, directory, .htaccess

Setting will ignore all Last-Modified headers the original output handler may have set.
This is helpful for applications that will generate such headers even for empty content.

XSendFilePath

DescriptionWhite-list more paths
SyntaxXSendFilePath
DefaultNone
Contextserver config, virtual host, directory

XSendFilePath allow you to add additional paths to some kind of white list. All files within these paths are allowed to get served through mod_xsendfile.

Provide an absolute path as Parameter to this directive.

You may provide more than one path.

Remarks - Relative paths

The current working directory (if it can be determined) will be always checked first.

If you provide relative paths via the X-SendFile header, then all whitelist items will be checked until a seamingly valid combination is found, i.e. the result is within the bounds of the whitelist item; it isn't checked at this point if the path in question actually exists.
Considering you whitelisted and and your script working directory is .

  1. - Within bounds of , OK
  1. - Not within bounds of
  2. - Not within bounds of
  3. - Within bounds of , OK

You still can only access paths that are whitelisted. However you have might expect a different behavior here, hence the documentation.

Remarks - Inheritance

The white list "inherits" entries from higher level configuration.

XSendFilePath /tmp <VirtualHost *> ServerName someserver XSendFilePath /home/userxyz </VirtualHost> <VirtualHost *> ServerName anotherserver XSendFilePath /var/www/somesite/ <Directory /var/www/somesite/fastcgis> XSendFilePath /var/www/shared </Directory> </VirtualHost>

Above example will give:

  • *
  • someserver
  • another
    • (for scripts* located in /var/www/somesite/fastcgis)

*) Scripts, in this context, mean the actual script-starters. E.g. PHP as a handler will use the .php itself, while in CGI mode refers to the starter.

Windows users should take care to include the drive letter to those paths as well. Tests show that it has to be in upper-case.

Example

<Files out.php> XSendFile on </Files>

Limitations / Issues / Security considerations

  • The header - if present - will be dropped, as the module cannot know if it was set by intention of the programmer or the handler. E.g. php with output compression enabled will set this header, but the replacement file send via mod_xsendfile is most likely not compressed.
  • The header key (X-SENDFILE) is not case-sensitive.
  • X-Sendfile will also send files that are otherwise protected (e.g. Deny from all). This includes .htaccess and such!
    ... as long as one has regular file access permissions defined in the file system.
    But, on the other hand, how is this different from the usual scripting?

Credits

The idea comes from lighttpd - A fast web server with minimal memory footprint.

The module itself was inspired by many other Apache2 modules such as mod_rewrite, mod_headers and obviously core.c.

License

Copyright 2006-2010 by Nils Maier

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

Changes

Version 0.12

  • Now incorrect headers will be dropped early

Version 0.11.1

  • Fixed some documentation bugs
  • Built win32 binaries against latest httpd using MSVC9
  • Updated MSVC Project files

Version 0.11

Version 0.10

  • Won't override Etag/Last-Modified if already set.
  • New Configuration directive: XSendFileIgnoreEtag
  • New Configuration directive: XSendFileIgnoreLastModified
  • New Configuration directive: XSendFilePath
  • Removed Configuration directive: XSendFileAllowAbove
    Use XSendFilePath instead.
  • Improved header handling for FastCGI/CGI output (removing duplicate headers).

Version 0.9

  • New configuration directive: XSendFileAllowAbove
  • Initial FastCGI/CGI support
  • Filter only added when needed

Version 0.8

  • This is the initial public release.
Источник: https://tn123.org/mod_xsendfile/

Apache mod-rails source download

3 thoughts to “Apache mod-rails source download”

Leave a Reply

Your email address will not be published. Required fields are marked *