Compare commits
6 Commits
es_rev_980
...
es_rev9833
| Author | SHA1 | Date | |
|---|---|---|---|
| b5d6a75155 | |||
| 4fc4b02449 | |||
| 5276bd1479 | |||
|
|
81ab31b19a | ||
|
|
e21e30ff74 | ||
|
|
3a9ba75717 |
163
doc/workbook/deployment.md
Normal file
163
doc/workbook/deployment.md
Normal file
@@ -0,0 +1,163 @@
|
||||
EWF Deployment
|
||||
==============
|
||||
|
||||
#Apache on Windows#
|
||||
|
||||
1. Apache Install
|
||||
2. Deploying EWF CGI
|
||||
3. CGI overview
|
||||
1. Build EWF application
|
||||
2. Copy the generated exe file and the www content .htaccess CGI
|
||||
4. Deploying EWF FCGI
|
||||
5. FCGI overview
|
||||
1. Build EWF application
|
||||
2. Copy the generated exe file and the www content.htaccess CGI
|
||||
|
||||
|
||||
|
||||
##Apache on Windows
|
||||
|
||||
###Apache Install
|
||||
|
||||
>Check the correct version (Win 32 or Win64)
|
||||
>Apache Version: Apache 2.4.4
|
||||
>Windows: http://www.apachelounge.com/download/
|
||||
|
||||
####Deploying EWF CGI
|
||||
|
||||
####CGI overview
|
||||
>A new process is started for each HTTP request. So if there are N requests to the same >CGI program, the code of the CGI program is loaded into memory N times.
|
||||
>When a CGI program finishes handling a request, the program terminates.
|
||||
|
||||
* Build EWF application
|
||||
|
||||
ec -config [app.ecf] -target [app_cgi] -finalize -c_compile -project_path
|
||||
|
||||
|
||||
>Note: change app.ecf and target app_cgi based on your own configuration.
|
||||
|
||||
* Copy the generated exe file and the www content
|
||||
|
||||
Copy the app.exe and the folder _www_ into a folder served by apache2, for example under.
|
||||
|
||||
|
||||
<APACHE_PATH>/htdocs.
|
||||
|
||||
<APACHE_PATH> = path to your apache installation
|
||||
|
||||
Edit httpd.conf under c:/<APACHE_PATH>/conf
|
||||
|
||||
DocumentRoot "c:/<APACHE_PATH>/htdocs"
|
||||
|
||||
<Directory "c:/<APACHE_PATH>/htdocs">
|
||||
AllowOverride All --
|
||||
Require all granted -- this is required in Apache 2.4.4
|
||||
</Directory>
|
||||
|
||||
Check that you have the following modules enabled
|
||||
|
||||
LoadModule cgi_module modules/mod_cgi.so
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
|
||||
####Tip:
|
||||
>To check the syntax of your httpd.conf file. From command line run the following
|
||||
|
||||
$>httpd - t
|
||||
|
||||
|
||||
>.htaccess CGI
|
||||
http://perishablepress.com/stupid-htaccess-tricks/
|
||||
|
||||
####.htaccess
|
||||
|
||||
Options +ExecCGI +Includes +FollowSymLinks -Indexes
|
||||
AddHandler cgi-script exe
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
|
||||
RewriteRule ^$ $service [L]
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !$service
|
||||
RewriteRule ^(.*)$ $service/$1
|
||||
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||
</IfModule
|
||||
|
||||
>Replace $service with the name of your executable service, for example app_service.exe
|
||||
|
||||
|
||||
####Deploying EWF FCGI
|
||||
>To deploy FCGI you will need to download the mod_fcgi module.
|
||||
>You can get it from here http://www.apachelounge.com/download/
|
||||
|
||||
####FCGI overview
|
||||
>FastCGI allows a single, long-running process to handle more than one user request while keeping close to the CGI programming model, retaining the simplicity while eliminating the overhead of creating a new process for each request. Unlike converting an application to a web server plug-in, FastCGI applications remain independent of the web server.
|
||||
|
||||
* Build EWF application
|
||||
|
||||
ec -config [app.ecf] -target [app_fcgi] -finalize -c_compile -project_path .
|
||||
|
||||
>Note: change app.ecf and target app_fcgi based on your own configuration.
|
||||
|
||||
* Copy the generated exe file and the www content
|
||||
|
||||
Copy the app.exe and the folder "www" into a folder served by apache2, for example under
|
||||
|
||||
<APACHE_PATH>/htdocs.
|
||||
|
||||
<APACHE_PATH> = path to your apache installation
|
||||
|
||||
Edit httpd.conf under c:/<APACHE_PATH>/conf
|
||||
|
||||
DocumentRoot "c:/<APACHE_PATH>/htdocs"
|
||||
|
||||
<Directory "c:/<APACHE_PATH>/htdocs">
|
||||
AllowOverride All --
|
||||
Require all granted -- this is required in Apache 2.4.4
|
||||
</Directory>
|
||||
|
||||
>Check that you have the following modules enabled
|
||||
|
||||
LoadModule rewrite_module modules/mod_rewrite.so
|
||||
LoadModule fcgid_module modules/mod_fcgid.so
|
||||
|
||||
>NOTE: By default Apache does not come with fcgid module, so you will need to download it, and put the module under Apache2/modules
|
||||
|
||||
#.htaccess FCGI
|
||||
>http://perishablepress.com/stupid-htaccess-tricks/
|
||||
|
||||
####.htaccess
|
||||
|
||||
Options +ExecCGI +Includes +FollowSymLinks -Indexes
|
||||
|
||||
<IfModule mod_fcgid.c>
|
||||
AddHandler fcgid-script .ews
|
||||
FcgidWrapper $FULL_PATH/$service .ews
|
||||
</IfModule>
|
||||
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
|
||||
RewriteBase /
|
||||
RewriteRule ^$ service.ews [L]
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
||||
RewriteCond %{REQUEST_URI} !service.ews
|
||||
RewriteRule ^(.*)$ service.ews/$1
|
||||
|
||||
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||
</IfModule>
|
||||
|
||||
Replace $service with the name of your executable $service, for example app_service.exe
|
||||
You will need to create an service.ews file, this file will be located at the same place where you copy your app service executable.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
* [EWF Introduction](#introduction)
|
||||
* [Handling Requests: Form/Query Parameter](#form_query_parameters)
|
||||
* [Handling Requests: Header Fields](#header_fields)
|
||||
* [Generating Responses](/workbook/generating_response/generating_response.md)
|
||||
* [Handling Cookies](/workbook/handling_cookies/handling_cookies.md)
|
||||
*
|
||||
* [Generating Responses](#generating responses)
|
||||
* [Handling Cookies](#handling_cookies)
|
||||
* [EWF Deployment](#deployment)
|
||||
|
||||
<a name="core"></a>
|
||||
# EWF Core
|
||||
@@ -29,10 +29,14 @@ Before reading (or walking throught) the workbook, to get a quick overview of EW
|
||||
## Handling Requests: Header Fields
|
||||
[Handling Requests: Header Fields](/doc/workbook/handling_request/headers.md).
|
||||
|
||||
<a name="header_fields"></a>
|
||||
<a name="generating_responses"></a>
|
||||
## Generating Response
|
||||
[Generating Responses](/doc/workbook/generating_response/generating_response.md)
|
||||
|
||||
<a name="handling_cookies"></a>
|
||||
## Handling Cookies
|
||||
[Handling Cookies](/doc/workbook/handling_cookies/handling_cookies.md)
|
||||
|
||||
<a name="deployment"/>
|
||||
## EWF Deployment
|
||||
[EWF Deployment](/doc/workbook/deployment.md)
|
||||
|
||||
@@ -58,13 +58,15 @@ feature -- Status
|
||||
do
|
||||
p := a_path
|
||||
l_uri := based_uri (uri, a_router)
|
||||
if l_uri.ends_with ("/") then
|
||||
if not p.ends_with ("/") then
|
||||
p := p + "/"
|
||||
end
|
||||
else
|
||||
if p.ends_with ("/") then
|
||||
p := p.substring (1, p.count - 1)
|
||||
if trailing_slash_ignored then
|
||||
if l_uri.ends_with ("/") then
|
||||
if not p.ends_with ("/") then
|
||||
p := p + "/"
|
||||
end
|
||||
else
|
||||
if p.ends_with ("/") then
|
||||
p := p.substring (1, p.count - 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
if p.same_string (l_uri) then
|
||||
|
||||
@@ -2,8 +2,8 @@ note
|
||||
description: "[
|
||||
Table which can contain value indexed by a key
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
date: "$Date: 2015-11-05 21:52:56 +0100 (jeu., 05 nov. 2015) $"
|
||||
revision: "$Revision: 98081 $"
|
||||
|
||||
class
|
||||
WSF_TABLE
|
||||
@@ -14,7 +14,7 @@ inherit
|
||||
as_string
|
||||
end
|
||||
|
||||
ITERABLE [WSF_VALUE]
|
||||
TABLE_ITERABLE [WSF_VALUE, READABLE_STRING_32]
|
||||
|
||||
create
|
||||
make,
|
||||
@@ -193,7 +193,7 @@ feature -- Element change
|
||||
|
||||
feature -- Traversing
|
||||
|
||||
new_cursor: ITERATION_CURSOR [WSF_VALUE]
|
||||
new_cursor: TABLE_ITERATION_CURSOR [WSF_VALUE, READABLE_STRING_32]
|
||||
do
|
||||
Result := values.new_cursor
|
||||
end
|
||||
|
||||
@@ -70,6 +70,7 @@ feature -- Conversion
|
||||
a_html.append ("<td")
|
||||
append_css_class_to (a_html, Void)
|
||||
append_css_style_to (a_html)
|
||||
append_html_attributes_to (a_html)
|
||||
a_html.append_character ('>')
|
||||
content.append_to_html (a_theme, a_html)
|
||||
a_html.append ("</td>")
|
||||
|
||||
Reference in New Issue
Block a user