142 lines
3.5 KiB
Plaintext
142 lines
3.5 KiB
Plaintext
|
|
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/themes/>
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine Off
|
|
</IfModule>
|
|
</Directory>
|
|
|
|
<Directory /home/vhosts/webservice/public/libs/>
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine Off
|
|
</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/themes/>
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine Off
|
|
</IfModule>
|
|
</Directory>
|
|
|
|
<Directory /home/vhosts/webservice/current/public/libs/>
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine Off
|
|
</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>
|
|
|