Backoffice : configuration
This commit is contained in:
parent
9e6bc85a34
commit
5ae28b8f49
41
apps/backoffice/etc/apache2/vhost.dev.conf
Normal file
41
apps/backoffice/etc/apache2/vhost.dev.conf
Normal file
@ -0,0 +1,41 @@
|
||||
<VirtualHost *:8000>
|
||||
ServerName PROJECT_DNS
|
||||
SetEnv APPLICATION_ENV "PROJECT_ENV"
|
||||
|
||||
AddDefaultCharset utf-8
|
||||
UseCanonicalName On
|
||||
UseCanonicalPhysicalPort On
|
||||
ServerSignature On
|
||||
DirectoryIndex index.php
|
||||
|
||||
DocumentRoot PROJECT_DIR/current/public
|
||||
<Directory PROJECT_DIR/current/public/>
|
||||
Options -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 PROJECT_DIR/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}/backoffice-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/backoffice-access.log combined
|
||||
</VirtualHost>
|
97
apps/backoffice/etc/apache2/vhost.prod.conf
Normal file
97
apps/backoffice/etc/apache2/vhost.prod.conf
Normal file
@ -0,0 +1,97 @@
|
||||
<VirtualHost *:8000>
|
||||
ServerName PROJECT_DNS
|
||||
SetEnv APPLICATION_ENV "PROJECT_ENV"
|
||||
|
||||
AddDefaultCharset utf-8
|
||||
UseCanonicalName On
|
||||
UseCanonicalPhysicalPort On
|
||||
ServerSignature Off
|
||||
DirectoryIndex index.php
|
||||
|
||||
DocumentRoot PROJECT_DIR/current/public
|
||||
<Directory PROJECT_DIR/current/public/>
|
||||
Options -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 PROJECT_DIR/current/public/assets/>
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine Off
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
SetOutputFilter DEFLATE
|
||||
DeflateCompressionLevel 9
|
||||
</IfModule>
|
||||
<Location />
|
||||
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
|
||||
AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
|
||||
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
|
||||
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
|
||||
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
|
||||
AddOutputFilterByType DEFLATE font/truetype font/opentype
|
||||
# Pour les proxies
|
||||
Header append Vary User-Agent env=!dont-vary
|
||||
</Location>
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresDefault "access plus 5 seconds"
|
||||
ExpiresByType image/x-icon "access plus 2592000 seconds"
|
||||
ExpiresByType image/jpeg "access plus 2592000 seconds"
|
||||
ExpiresByType image/png "access plus 2592000 seconds"
|
||||
ExpiresByType image/gif "access plus 2592000 seconds"
|
||||
ExpiresByType image/svg+xml "access plus 2592000 seconds"
|
||||
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
|
||||
ExpiresByType text/css "access plus 604800 seconds"
|
||||
ExpiresByType text/javascript "access plus 216000 seconds"
|
||||
ExpiresByType application/javascript "access plus 216000 seconds"
|
||||
ExpiresDefault "access plus 5 seconds"
|
||||
ExpiresByType image/x-icon "access plus 2592000 seconds"
|
||||
ExpiresByType image/jpeg "access plus 2592000 seconds"
|
||||
ExpiresByType image/png "access plus 2592000 seconds"
|
||||
ExpiresByType image/gif "access plus 2592000 seconds"
|
||||
ExpiresByType image/svg+xml "access plus 2592000 seconds"
|
||||
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
|
||||
ExpiresByType text/css "access plus 604800 seconds"
|
||||
ExpiresByType text/javascript "access plus 216000 seconds"
|
||||
ExpiresByType application/javascript "access plus 216000 seconds"
|
||||
ExpiresByType application/x-javascript "access plus 216000 seconds"
|
||||
ExpiresByType text/html "access plus 600 seconds"
|
||||
ExpiresByType application/xhtml+xml "access plus 600 seconds"
|
||||
</IfModule>
|
||||
<IfModule mod_headers.c>
|
||||
<filesMatch ".(ico|jpe?g|png|gif|swf)$">
|
||||
Header set Cache-Control "public"
|
||||
</filesMatch>
|
||||
<filesMatch ".(css)$">
|
||||
Header set Cache-Control "public"
|
||||
</filesMatch>
|
||||
<filesMatch ".(js)$">
|
||||
Header set Cache-Control "private"
|
||||
</filesMatch>
|
||||
<filesMatch ".(x?html?|php)$">
|
||||
Header set Cache-Control "private, must-revalidate"
|
||||
</filesMatch>
|
||||
</IfModule>
|
||||
FileETag None
|
||||
|
||||
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
|
||||
LogLevel error
|
||||
ErrorLog ${APACHE_LOG_DIR}/backoffice-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/backoffice-access.log combined
|
||||
</VirtualHost>
|
13
apps/backoffice/etc/cron.d/backoffice
Normal file
13
apps/backoffice/etc/cron.d/backoffice
Normal file
@ -0,0 +1,13 @@
|
||||
MAILTO=supportdev@scores-decisions.com
|
||||
##############
|
||||
# Backoffice #
|
||||
##############
|
||||
01 00 * * * www-data php /home/vhosts/backoffice/current/scripts/jobs/setLogCount.php --nocontrat --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/count.log 2>&1
|
||||
09 00 * * * www-data php /home/vhosts/backoffice/current/scripts/jobs/seFluxCount.php --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/flux.log 2>&1
|
||||
|
||||
01 06 * * * www-data php /home/vhosts/backoffice/current/scripts/jobs/setLogCount.php --filelogs --nocontrat --date $(date +\%Y\%m) >> /home/vhosts/backoffice/shared/log/count.log 2>&1
|
||||
01 05 1 * * www-data php /home/vhosts/backoffice/current/scripts/jobs/setLogCount.php --filefact --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/count.log 2>&1
|
||||
01 06 1 * * www-data php /home/vhosts/backoffice/current/scripts/jobs/setLogCount.php --filelogs --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/count.log 2>&1
|
||||
01 07 1 * * www-data php /home/vhosts/backoffice/current/scripts/jobs/seFluxCount.php --date $(date +\%Y\%m -d "1 month ago") >> /home/vhosts/backoffice/shared/log/flux.log 2>&1
|
||||
|
||||
01 19 * * 1-5 www-data php /home/vhosts/backoffice/current/scripts/jobs/setOperatorStat.php --date $(date +\%Y\%m\%d) >> /home/vhosts/backoffice/shared/log/operator.log 2>&1
|
7
apps/backoffice/etc/logrotate.d/backoffice
Normal file
7
apps/backoffice/etc/logrotate.d/backoffice
Normal file
@ -0,0 +1,7 @@
|
||||
/home/vhosts/backoffice/shared/log/*.log {
|
||||
rotate 4
|
||||
weekly
|
||||
missingok
|
||||
compress
|
||||
notifempty
|
||||
}
|
Loading…
Reference in New Issue
Block a user