First integration of the new GW_ design more centralized on connector, and does not require specific feature on GW_APPLICATION depending on the connector.
So this is really more flexible this way, and much easier to write application supporting CGI, FCGI, Nino and so on .. as demonstrated in hello_world This is a first version, more will come later, mainly migrating from Eiffel Web Reloaded to this Eiffel Web Framework project.
This commit is contained in:
64
library/server/libfcgi/tests/apache2.conf
Normal file
64
library/server/libfcgi/tests/apache2.conf
Normal file
@@ -0,0 +1,64 @@
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
|
||||
DocumentRoot /var/www
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
<Directory /var/www/>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
||||
<Directory "/usr/lib/cgi-bin">
|
||||
AllowOverride None
|
||||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
|
||||
# Possible values include: debug, info, notice, warn, error, crit,
|
||||
# alert, emerg.
|
||||
LogLevel warn
|
||||
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
|
||||
Alias /doc/ "/usr/share/doc/"
|
||||
<Directory "/usr/share/doc/">
|
||||
Options Indexes MultiViews FollowSymLinks
|
||||
AllowOverride None
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from 127.0.0.0/255.0.0.0 ::1/128
|
||||
</Directory>
|
||||
|
||||
<IfModule mod_fcgid.c>
|
||||
# FcgidIdleTimeout 600
|
||||
# FcgidBusyScanInterval 120
|
||||
# FcgidProcessLifeTime 0
|
||||
# #7200
|
||||
# FcgidMaxProcesses 1000
|
||||
# FcgidMaxProcessesPerClass 100
|
||||
# FcgidMinProcessesPerClass 100
|
||||
# FcgidConnectTimeout 8
|
||||
# FcgidIOTimeout 60
|
||||
# FcgidBusyTimeout 1200
|
||||
|
||||
alias /eiffelweb/ "/home/jfiat/_dev/EiffelWebReloaded/library/fcgi/tests/EIFGENs/eiffelweb/W_code/"
|
||||
<Location /eiffelweb/>
|
||||
AddHandler fcgid-script .ews
|
||||
Options Indexes FollowSymLinks ExecCGI
|
||||
# Customize the next two directives for your requirements.
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
||||
</Location>
|
||||
</IfModule>
|
||||
|
||||
</VirtualHost>
|
||||
80
library/server/libfcgi/tests/application_root.e
Normal file
80
library/server/libfcgi/tests/application_root.e
Normal file
@@ -0,0 +1,80 @@
|
||||
note
|
||||
description : "Objects that ..."
|
||||
author : "$Author$"
|
||||
date : "$Date$"
|
||||
revision : "$Revision$"
|
||||
|
||||
class
|
||||
APPLICATION_ROOT
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Initialize `Current'.
|
||||
local
|
||||
res: INTEGER
|
||||
nb: INTEGER
|
||||
do
|
||||
initialize
|
||||
from
|
||||
res := fcgi.fcgi_listen
|
||||
until
|
||||
res < 0
|
||||
loop
|
||||
nb := nb + 1
|
||||
fcgi.put_string (header ("FCGI Eiffel Application"))
|
||||
|
||||
fcgi.put_string ("<h1>Hello FCGI Eiffel Application</h1>%N")
|
||||
fcgi.put_string ("Request number " + nb.out + "<br/>%N")
|
||||
|
||||
fcgi.put_string ("<ul>Environment variables%N")
|
||||
print_environment_variables (fcgi.updated_environ_variables)
|
||||
fcgi.put_string ("</ul>")
|
||||
fcgi.put_string (footer)
|
||||
|
||||
res := fcgi.fcgi_listen
|
||||
end
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
header (a_title: STRING): STRING
|
||||
do
|
||||
Result := "Content-type: text/html%R%N"
|
||||
Result.append ("%R%N")
|
||||
Result.append ("<html>%N")
|
||||
Result.append ("<head><title>" + a_title + "</title></head>")
|
||||
Result.append ("<body>%N")
|
||||
end
|
||||
|
||||
footer: STRING
|
||||
do
|
||||
Result := "</body>%N</html>%N"
|
||||
end
|
||||
|
||||
print_environment_variables (vars: HASH_TABLE [STRING, STRING])
|
||||
local
|
||||
do
|
||||
from
|
||||
vars.start
|
||||
until
|
||||
vars.after
|
||||
loop
|
||||
fcgi.put_string ("<li><strong>" + vars.key_for_iteration + "</strong> = " + vars.item_for_iteration + "</li>%N")
|
||||
vars.forth
|
||||
end
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
initialize
|
||||
do
|
||||
create fcgi.make
|
||||
end
|
||||
|
||||
fcgi: FCGI
|
||||
|
||||
end
|
||||
16
library/server/libfcgi/tests/eiffelweb.ecf
Normal file
16
library/server/libfcgi/tests/eiffelweb.ecf
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-8-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-8-0 http://www.eiffel.com/developers/xml/configuration-1-8-0.xsd" name="eiffelweb" uuid="6A03BC65-BD03-4B68-B51E-2543F9471D42">
|
||||
<target name="eiffelweb">
|
||||
<root cluster="application" class="APPLICATION_ROOT" feature="make"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/\.git$</exclude>
|
||||
<exclude>/\.svn$</exclude>
|
||||
</file_rule>
|
||||
<setting name="console_application" value="true"/>
|
||||
<setting name="concurrency" value="thread"/>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="fcgi" location="..\fcgi.ecf" readonly="false"/>
|
||||
<cluster name="application" location=".\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
Reference in New Issue
Block a user