스테이징 환경 (uat)을 설정했습니다. 모든 이메일을 하나의 이메일 주소 또는 최악의 경우 이메일 기능을 사용하지 못하도록 리디렉션합니다. 내 문제는 다음 설정에도 불구하고 응용 프로그램이 환경을 개선해야하는 것처럼 전자 메일을 보내고 있다는 것입니다.Swiftmailer는 여전히 disable_delivery 또는 delivery_address에도 불구하고 이메일을 보냅니다.
# config_uat.yml
imports:
- { resource: config.yml }
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
swiftmailer:
transport: smtp
host: 127.0.0.1
port: 25
encryption: null
sender_address: [email protected]
logging: "%kernel.debug%"
delivery_address: '[email protected]'
disable_delivery: true
그리고 :
#config.yml
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: "@psmdbBundle/Resources/config/services.yml" }
- { resource: "@psmdbBundle/Resources/config/version.yml" }
# Swiftmailer Configuration
swiftmailer:
transport: smtp
host: 127.0.0.1
port: 25
encryption: null
sender_address: [email protected]
logging: "%kernel.debug%"
[편집]
은 내가 app_uat.php 설정을 가지고있다. 그것은 app.php을 기반으로합니다
<?php
use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
// Use APC for autoloading to improve performance.
// Change 'sf2' to a unique prefix in order to prevent cache key conflicts
// with other applications also using APC.
/*
$loader = new ApcClassLoader('sf2', $loader);
$loader->register(true);
*/
//require_once __DIR__.'/../app/AppKernel.php';
//require_once __DIR__.'/../app/AppCache.php';
$kernel = new AppKernel('uat', false);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
[수정 2] 내가 확인하고 찌르다 환경 대신 UAT의 실행 중입니다. 내가 UAT 실행 설정 내 아파치 설정을 관리 할 수 없습니다 ... 여기있다 :
<VirtualHost *:80>
ServerName uat.gpsc.domain.com
DocumentRoot /var/www/vhosts/uat.gpsc.domain.com/current/web
<Directory /var/www/vhosts/uat.gpsc.domain.com/current/web>
AllowOverride All
Require all granted
Allow from All
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app_uat.php [QSA,L]
</IfModule>
</Directory>
ErrorLog /var/log/apache2/uat.project_error.log
CustomLog /var/log/apache2/uat.project_access.log combined
</VirtualHost>
ls -a
를 수행하여 심포니 루트 폴더 또는 웹 폴더에 숨겨진 파일을 나열합니다. – curuba질문을 업데이트 해 주셔서 감사합니다. 귀하의 문제는 확실히 아파치에 있습니다. 그에 따라 대답을 편집했습니다. – galeaspablo
당신이 제안한대로이 문제는 AllowOverride All과 Symfony 프레임 워크가 제공하는 기본 .htaccess와 관련이 있습니다. – curuba