2013-06-17 4 views
1

www.sampledomain.com에서 symfony2 앱을 실행하고 웹 서버로 nginx를 실행합니다.nginx 및 phpbb3 포럼을 사용하여 symfony2 앱 실행

나는 하위 디렉토리에 phpbb3 포럼을 실행하고 싶습니다

, www.sampledomain.com/forum

그러나 phbb3 파일에 존재하는 어떤 경로 설정이 없기 때문에 심포니가 요청을 캡처하고 404을 게시됩니다

/forum 디렉토리.

설명서를 검색했지만 symfony2에게/포럼에 대한 요청을 "통과"하도록 지시 할 수는 없습니다. 이것이 가능한가?

업데이트 # 1 : 내 nginx를 구성, 요청에 따라 :

server { 
listen  80; 
client_header_timeout 600s; 
client_body_timeout 600s; 

server_name www.sampledomain.com; 
root /home/ec2-user/www/sampledomain/www/web; 
access_log /var/log/www.sampledomain.com.access_log; 
error_log /var/log/www.sampledomain.com.error_log; 

# strip app.php/ prefix if it is present 
rewrite ^/app\.php/?(.*)$ /$1 permanent; 

location/{ 
    index app.php; 
    try_files $uri @rewriteapp; 
} 

location @rewriteapp { 
    rewrite ^(.*)$ /app.php/$1 last; 
} 

location ~ ^/(app|app_dev|config)\.php(/|$) { 
fastcgi_split_path_info ^(.+\.php)(.*)$; 
#try_files  $uri /index.php; 
fastcgi_index index.php; 
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 
include   fastcgi_params; 
fastcgi_param SCRIPT_FILENAME /home/ec2-user/www/sampledomain/www/web$fastcgi_script_name; 
send_timeout 600s; 
fastcgi_read_timeout 5m; 
#fastcgi_param SCRIPT_NAME  $fastcgi_script_name; 
} 

}

+0

symfony 사이트에 대한 nginx 구성을 공유하십시오. 그러면/포럼에 대한 app.php로 전달 요청을 제외시킬 위치를 어디에 넣어야하는지 알려주세요. – nifr

+0

요청 된 @nifr로 추가되었습니다. - 감사합니다. – SRG

답변

0

그래서, 내가 전에 phbb3을 사용하지 않은

location /forum { 
    root [path to www]/forum; 
    try_files $uri $uri/ [index location]; 
} 

의 nginx에서/포럼 위치를 추가 나는 정확한 색인 위치를 모른다.