Added an example to run the debug app with apache2+libfcgi inside a docker container.
This commit is contained in:
25
examples/docker/files/build_debug_fcgi
Normal file
25
examples/docker/files/build_debug_fcgi
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
web_dir=$1
|
||||
|
||||
mkdir $web_dir/bin
|
||||
mkdir $web_dir/html
|
||||
|
||||
# Install latest EiffelStudio suite.
|
||||
curl -sSL https://www.eiffel.org/setup/install.sh > install_eiffel.sh \
|
||||
&& bash ./install_eiffel.sh latest > $HOME/eiffel.rc
|
||||
|
||||
# Setup Eiffel environment
|
||||
source $HOME/eiffel.rc
|
||||
|
||||
# Get source code
|
||||
git clone https://github.com/EiffelWebFramework/EWF.git $web_dir/src
|
||||
|
||||
# Build executable
|
||||
eiffel build -v --target debug_libfcgi $web_dir/src/examples/debug/debug.ecf $web_dir/bin/debug.fcgi
|
||||
|
||||
# Clean files
|
||||
rm -rf $ISE_EIFFEL
|
||||
rm -rf $web_dir/src
|
||||
|
||||
exit $?
|
||||
20
examples/docker/files/html/.htaccess
Normal file
20
examples/docker/files/html/.htaccess
Normal file
@@ -0,0 +1,20 @@
|
||||
<IfModule mod_fcgid.c>
|
||||
AddHandler fcgid-script .ews
|
||||
FcgidWrapper /home/eifweb/www/bin/debug.fcgi .ews
|
||||
</IfModule>
|
||||
|
||||
Options +ExecCGI +Includes +FollowSymLinks
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
|
||||
#RewriteRule ^.*$ maintenance.html [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^$ service.ews/
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
||||
RewriteRule ^(.*)$ service.ews/$1 [C]
|
||||
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||
</IfModule>
|
||||
19
examples/docker/files/html/index.html
Normal file
19
examples/docker/files/html/index.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>EiffelWeb running on Apache2+libfcgi</title>
|
||||
</head>
|
||||
<body>
|
||||
EiffelWeb debug example hosted on apache2+libfcgi .
|
||||
<ul>
|
||||
<li>Send a GET request <a href="get?foo=bar">get?foo=bar</a></li>
|
||||
<li>Send a POST request <form action="post?foo=bar" method="POST">
|
||||
<input type="text" name="one" value="value_1"/>
|
||||
<input type="text" name="two" value="value_2"/>
|
||||
<input type="submit" value="Submit"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
53
examples/docker/files/httpd.conf
Normal file
53
examples/docker/files/httpd.conf
Normal file
@@ -0,0 +1,53 @@
|
||||
<IfModule mod_fcgid.c>
|
||||
FcgidIdleTimeout 60
|
||||
FcgidBusyScanInterval 120
|
||||
FcgidProcessLifeTime 1800
|
||||
#7200
|
||||
FcgidMaxProcesses 10
|
||||
FcgidMaxProcessesPerClass 100
|
||||
FcgidMinProcessesPerClass 100
|
||||
FcgidConnectTimeout 8
|
||||
FcgidIOTimeout 3000
|
||||
FcgidBusyTimeout 300
|
||||
FcgidPassHeader Authorization
|
||||
FcgidMaxRequestLen 10000000
|
||||
FcgidMaxRequestsPerProcess 100
|
||||
</IfModule>
|
||||
|
||||
<VirtualHost *:80>
|
||||
# The ServerName directive sets the request scheme, hostname and port that
|
||||
# the server uses to identify itself. This is used when creating
|
||||
# redirection URLs. In the context of virtual hosts, the ServerName
|
||||
# specifies what hostname must appear in the request's Host: header to
|
||||
# match this virtual host. For the default virtual host (this file) this
|
||||
# value is not decisive as it is used as a last resort host regardless.
|
||||
# However, you must set it for any further virtual host explicitly.
|
||||
#ServerName www.example.com
|
||||
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /home/eifweb/www/html
|
||||
|
||||
<Directory /home/eifweb/www/html>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
|
||||
# error, crit, alert, emerg.
|
||||
# It is also possible to configure the loglevel for particular
|
||||
# modules, e.g.
|
||||
#LogLevel info ssl:warn
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
|
||||
# For most configuration files from conf-available/, which are
|
||||
# enabled or disabled at a global level, it is possible to
|
||||
# include a line for only one particular virtual host. For example the
|
||||
# following line enables the CGI configuration for this host only
|
||||
# after it has been globally disabled with "a2disconf".
|
||||
#Include conf-available/serve-cgi-bin.conf
|
||||
|
||||
|
||||
</VirtualHost>
|
||||
Reference in New Issue
Block a user