Symfony2 merger with other resource



  • To date, one host has a structure symfony2.domain.com (sighs)/var/www/symfony2) - Work symphony roll 2 projects domain.com (sighs)/var/www/domain.com- a site on another platform.

    The challenge is to make Simphoni available on the Route domain.com/symfony2 free of redirection (to be closed)

    So far, the simplest but curved idea of implementing the catalogue structure /var/www/symfony2/site/base (to the base) In apache DocumentRoot /var/www/symfony2/site Then you'll have to ignore the site director git except base.

    Can this be done without destroying the structure of the file system?



  • The more appropriate solution was to establish ngnix as front-end web server (at 80 port), domain.com at 8080, symfony2 at 8081 only locally available. And with proxy_pass, routing.

    Example of configuration ngnix

    server {
    ...       
        location / {
                proxy_pass http://127.0.0.1:8080;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }
        location /symfony2 {
                proxy_pass https://127.0.0.1:8081/;
                proxy_set_header X-Real_IP $remote_addr;
                proxy_set_header X-Forwarded-For $remote_addr;
                proxy_set_header Host $host;
        }
    ...
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2