Giter Club home page Giter Club logo

atsfastcgi's Introduction

AtsFastcgi -- a FastCGI plugin implementation for Apache Traffic Server.

This plugin was presented at the ATS Euro-Tour summit in Cork [1]. Its current state should be considered alpha, the plugin has seen 0 production mileage.

[1] Slides: https://docs.google.com/presentation/d/1kJ3hxbmflh8z4jsquPskeb1xNrLXHAYI2-OQXwwftZU/edit

Install

cd src
ATS_SRC="/home/oschaaf/trafficserver"
ATS_EXEC="/usr/local"
make ATS_SRC="$ATS_SRC" ATS_EXEC="$ATS_EXEC"
sudo make ATS_SRC="$ATS_SRC" ATS_EXEC="$ATS_EXEC" install

CONFIG

Add to plugin.config:

# For possible settings, see below
ats_fastcgi.so /usr/local/etc/trafficserver/fcgi.config

Starting CGI

sudo apt-get install php-cgi
php-cgi -b 60000

Running ATS

sudo traffic_server -T .*cgi.*

Requesting a php page

curl 127.0.0.1/test.php

Config php:

Default directory where php looks for scripts is "/var/www/html/ Simple test page that dump php info:

oschaaf@ats-fastcgi:/var/www/html⟫ cat test.php

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
?>

Settings

CONFIG proxy.config.http.fcgi.enabled INT 1
CONFIG proxy.config.http.fcgi.host.hostname STRING localhost
CONFIG proxy.config.http.fcgi.host.server_ip  STRING 127.0.0.1
CONFIG proxy.config.http.fcgi.host.server_port STRING 60000
CONFIG proxy.config.http.fcgi.host.include STRING etc/trafficserver/fastcgi.config
CONFIG proxy.config.http.fcgi.host.document_root STRING /var/www/
CONFIG proxy.config.http.fcgi.host.html STRING index.php
CONFIG proxy.config.http.fcgi.host.min_connections INT 2
CONFIG proxy.config.http.fcgi.host.max_connections INT 16
CONFIG proxy.config.http.fcgi.host.max_requests INT 1000
CONFIG proxy.config.http.fcgi.host.request_queue_size INT 250

atsfastcgi's People

Contributors

malwaderahul avatar oschaaf avatar piyushd-gdb avatar rahulm-gdb avatar rakeshchaitan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.