2017-04-25 54 views
1

我有一個問題;-)錯誤的URL爲Apache2中PROXYPASS和Nginx的作爲後端爲symfony1.2

我們:

的Apache2 - >的ProxyPass - > intern.domain.foo/ - > Ngnix - > PHP

的問題是一樣的CSS /圖像靜態文件....

我們得到:

https://foo.example.com/foobar/images/bla.png

而不是0

https://foo.example.com/foobar/iframes/images/bla.png

在我們APACHE2.2我們使用:

... 
# ProxyPass to Appint Iframes 
ProxyPass /iframes  http://intern.domain.foo 
<Location /iframes> 
    ProxyPassReverse http://intern.domain.foo 
</Location> 
.... 

在Nginx的:

server { 
    listen *:80; 
    server_name   intern.domain.foo; 

    root /opt/webapps/iframes/web/; 
    index index.php; 

    location/{ 
    root  /opt/webapps/iframes/web/; 
    index  index.html index.htm index.php; 
    try_files $uri /app.php$is_args$args; 

    } 

    location ~ ^/app\.php(/|$) { 
    root   /opt/webapps/iframes/web/; 
    include  /etc/nginx/fastcgi_params; 

    fastcgi_pass unix:/var/run/php5-fpm.sock; 
    fastcgi_connect_timeout 3m; 
    fastcgi_param DOCUMENT_ROOT $realpath_root; 
    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 
    fastcgi_read_timeout 3m; 
    fastcgi_send_timeout 3m; 
    fastcgi_split_path_info ^(.+\.php)(/.*)$; 
    internal; 
    } 
} 

symfony的應用程序不知道,它是通過Apache ProxyPass包含的,所以我的問題是,我必須在哪裏更改配置。在Apache2上,在Nginx上還是在Symfony上? :-)

非常感謝:-) 銅丹尼

回答