Mise à jour et simplification de la documentation
This commit is contained in:
parent
6ad6809b93
commit
0eb6e77392
62
docs/README
62
docs/README
@ -3,16 +3,58 @@ WebService
|
|||||||
|
|
||||||
- Créer le vhost, voir le fichier VHOST pour les exemples
|
- Créer le vhost, voir le fichier VHOST pour les exemples
|
||||||
|
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName webservice.sd.dev
|
||||||
|
AddDefaultCharset utf-8
|
||||||
|
|
||||||
|
<IfModule mod_xsendfile.c>
|
||||||
|
XSendFile On
|
||||||
|
XSendFilePath /home/vhosts/webservice/shared
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
DocumentRoot /home/vhosts/webservice/public
|
||||||
|
<Directory /home/vhosts/webservice/public/>
|
||||||
|
EnableSendfile Off
|
||||||
|
AllowOverride none
|
||||||
|
Require all granted
|
||||||
|
<Files ~ "^\.user.ini">
|
||||||
|
Order allow,deny
|
||||||
|
Deny from all
|
||||||
|
</Files>
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
|
RewriteRule ^.*$ - [NC,L]
|
||||||
|
RewriteRule ^.*$ index.php [NC,L]
|
||||||
|
</IfModule>
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /home/vhosts/webservice/public/assets/>
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine Off
|
||||||
|
</IfModule>
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
|
||||||
|
LogLevel error
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/webservice-error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/webservice-access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
- Installer les librairies avec composer
|
- Installer les librairies avec composer
|
||||||
|
|
||||||
$ composer install
|
$ composer install
|
||||||
|
|
||||||
|
|
||||||
- Configurer l'application
|
- Configurer l'application
|
||||||
|
|
||||||
La config (fichier application.ini) est à placer dans "application/configs/"
|
La config (fichier application.ini) est à placer dans "application/configs/"
|
||||||
|
|
||||||
Exemple de la config dans "docs/config/application.ini"
|
Exemple de la config dans "docs/config/application.ini" (Modifier selon les besoins)
|
||||||
(Modifier selon les besoins)
|
|
||||||
|
|
||||||
- APPLICATION_ENV
|
- APPLICATION_ENV
|
||||||
|
|
||||||
@ -25,6 +67,19 @@ WebService
|
|||||||
|
|
||||||
Cette variable est accessible dans PHP.
|
Cette variable est accessible dans PHP.
|
||||||
|
|
||||||
|
. mod_php
|
||||||
|
|
||||||
|
Add in <VirtualHost/>
|
||||||
|
SetEnv APPLICATION_ENV "development"
|
||||||
|
|
||||||
|
. php-fpm
|
||||||
|
|
||||||
|
Add a file in document root path (public/) a file .user.ini
|
||||||
|
env[APPLICATION_ENV] = "development"
|
||||||
|
|
||||||
|
See the .user.ini file
|
||||||
|
|
||||||
|
|
||||||
- Créer les repertoires de données nécessaires
|
- Créer les repertoires de données nécessaires
|
||||||
|
|
||||||
[WORKSPACE]/data/webservice/
|
[WORKSPACE]/data/webservice/
|
||||||
@ -106,6 +161,3 @@ Pour spécifier des éléments de taille (non pris en compte sur le WSDL)
|
|||||||
@xsd maxLength=15
|
@xsd maxLength=15
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
117
docs/VHOST
117
docs/VHOST
@ -1,117 +0,0 @@
|
|||||||
|
|
||||||
PHP Variables
|
|
||||||
=============
|
|
||||||
|
|
||||||
. mod_php
|
|
||||||
|
|
||||||
Add in <VirtualHost/>
|
|
||||||
SetEnv APPLICATION_ENV "development"
|
|
||||||
|
|
||||||
. php-fpm
|
|
||||||
|
|
||||||
Add a file in document root path (public/) a file .user.ini
|
|
||||||
env[APPLICATION_ENV] = "development"
|
|
||||||
|
|
||||||
See the .user.dev.ini file
|
|
||||||
|
|
||||||
Variables
|
|
||||||
---------
|
|
||||||
<mode> : production, staging, development
|
|
||||||
Défini le mode de fonctionnement pour les erreurs, etc
|
|
||||||
|
|
||||||
|
|
||||||
Development
|
|
||||||
===========
|
|
||||||
|
|
||||||
<VirtualHost *:80>
|
|
||||||
ServerName webservice.sd.dev
|
|
||||||
AddDefaultCharset utf-8
|
|
||||||
|
|
||||||
<IfModule mod_xsendfile.c>
|
|
||||||
XSendFile On
|
|
||||||
XSendFilePath /home/vhosts/webservice/shared
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
DocumentRoot /home/vhosts/webservice/public
|
|
||||||
<Directory /home/vhosts/webservice/public/>
|
|
||||||
EnableSendfile Off
|
|
||||||
AllowOverride none
|
|
||||||
Require all granted
|
|
||||||
<Files ~ "^\.user.ini">
|
|
||||||
Order allow,deny
|
|
||||||
Deny from all
|
|
||||||
</Files>
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine On
|
|
||||||
RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -d
|
|
||||||
RewriteRule ^.*$ - [NC,L]
|
|
||||||
RewriteRule ^.*$ index.php [NC,L]
|
|
||||||
</IfModule>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Directory /home/vhosts/webservice/public/assets/>
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine Off
|
|
||||||
</IfModule>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
|
|
||||||
LogLevel error
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/webservice-error.log
|
|
||||||
CustomLog ${APACHE_LOG_DIR}/webservice-access.log combined
|
|
||||||
</VirtualHost>
|
|
||||||
|
|
||||||
|
|
||||||
Production
|
|
||||||
==========
|
|
||||||
|
|
||||||
<VirtualHost *:8000>
|
|
||||||
ServerName webservice.scores-decisions.com
|
|
||||||
AddDefaultCharset utf-8
|
|
||||||
UseCanonicalName On
|
|
||||||
UseCanonicalPhysicalPort On
|
|
||||||
ServerSignature Off
|
|
||||||
|
|
||||||
SetEnv APPLICATION_ENV "production"
|
|
||||||
|
|
||||||
<IfModule mod_xsendfile.c>
|
|
||||||
XSendFile On
|
|
||||||
XSendFilePath /home/vhosts/webservice/shared
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
DirectoryIndex index.php
|
|
||||||
DocumentRoot /home/vhosts/webservice/current/public
|
|
||||||
<Directory /home/vhosts/webservice/current/public/>
|
|
||||||
Options FollowSymLinks Indexes
|
|
||||||
AllowOverride none
|
|
||||||
Require all granted
|
|
||||||
<Files ~ "^\.user.ini">
|
|
||||||
Order allow,deny
|
|
||||||
Deny from all
|
|
||||||
</Files>
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine On
|
|
||||||
RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -l [OR]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} -d
|
|
||||||
RewriteRule ^.*$ - [NC,L]
|
|
||||||
RewriteRule ^.*$ index.php [NC,L]
|
|
||||||
</IfModule>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Directory /home/vhosts/webservice/current/public/assets/>
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine Off
|
|
||||||
</IfModule>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
|
|
||||||
LogLevel error
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/webservice-error.log
|
|
||||||
CustomLog ${APACHE_LOG_DIR}/webservice-access.log combined
|
|
||||||
</VirtualHost>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user