---
name: "mod_actions"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:10.b.1a-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/mod_actions"
---

# mod\_actions(3erl)

Filetype/method-based script execution.

## NAME

mod\_actions - Filetype/method-based script execution.

## DESCRIPTION

This module runs CGI scripts whenever a file of a certain type or HTTP method (See RFC 1945) is requested. The following config directives are described:

- \*

  Action

- \*

  Script

## DIRECTIVE: Action

*Syntax:* *Action* mime-type cgi-script\
\
  *Default:* - None -\
\
  *Module:* mod\_actions(3)

*Action* adds an action, which will activate a *cgi-script* whenever a file of a certain *mime-type* is requested. It propagates the URL and file path of the requested document using the standard CGI *PATH\_INFO* and *PATH\_TRANSLATED* environment variables.

Examples:

```
Action text/plain /cgi-bin/log_and_deliver_text
Action home-grown/mime-type1 /~bob/do_special_stuff
```

## DIRECTIVE: Script

*Syntax:* *Script* method cgi-script\
\
  *Default:* - None -\
\
  *Module:* mod\_actions(3)

*Script* adds an action, which will activate a *cgi-script* whenever a file is requested using a certain HTTP *method*. The *method* is either *GET* or *POST* as defined in RFC 1945. It propagates the URL and file path of the requested document using the standard CGI *PATH\_INFO* and *PATH\_TRANSLATED* environment variables.

Examples:

```
Script GET /cgi-bin/get
Script POST /~bob/put_and_a_little_more
```

## EWSAPI MODULE INTERACTION

Uses the following EWSAPI interaction data, if available:

- ***{real\_name, {Path, AfterPath}}*:**

  as defined in mod\_alias(3).

Exports the following EWSAPI interaction data, if possible:

- ***{new\_request\_uri, RequestURI}*:**

  An alternative *RequestURI* has been generated.

Uses the following exported EWSAPI functions:

- \*

  mod\_alias:path/3

## SEE ALSO

httpd(3), mod\_alias(3)

## AUTHOR

```
Joakim Grebenö  - support@erlang.ericsson.se
```
