Apache2的URL错误,Proxypass和Nginx作为Symfony的后端

Apache2的URL错误,Proxypass和Nginx作为Symfony的后端,nginx,reverse-proxy,apache2.2,symfony-3.2,Nginx,Reverse Proxy,Apache2.2,Symfony 3.2,我有个问题;-) 我们有: Apache2->ProxyPass->intern.domain.foo/->Ngnix->PHP 问题是像CSS/图像这样的静态文件 我们得到: 而不是: 在我们的Apache2.2中,我们使用: ... # ProxyPass to Appint Iframes ProxyPass /iframes http://intern.domain.foo <Location /iframes> ProxyPassReverse ht

我有个问题;-)

我们有:

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

问题是像CSS/图像这样的静态文件

我们得到:

而不是:

在我们的Apache2.2中,我们使用:

...
# ProxyPass to Appint Iframes
ProxyPass /iframes        http://intern.domain.foo
<Location /iframes>
   ProxyPassReverse http://intern.domain.foo
</Location>
....
Symfony应用程序不知道它是通过Apache ProxyPass包含的,所以我的问题是,我必须在哪里更改配置。在Apache2或Nginx或Symfony上?:-)

非常感谢:-)
特写denny

您可以使用代理集标题执行此操作:

有关更多详细信息,请参见此处:或参见此处的示例用例:


嗨,谢谢你的回复。我们找到了同样的方法来解决这个问题。
    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;
  }
}
server {
  listen 80;
  server_name example.com;
  location / {
    proxy_pass       http://main;
    proxy_set_header Host            $host;
    proxy_set_header X-Forwarded-For $remote_addr;
  }
}