nginx 2 symfony2 web application, one ip no domain

Posted by Krzysztof Koch on Server Fault See other posts from Server Fault or by Krzysztof Koch
Published on 2012-10-01T15:11:45Z Indexed on 2012/10/01 15:41 UTC
Read the original article Hit count: 324

Filed under:
|

I have irritating with nginx. I set up in /usr/share/nginx/www/firstapp one application and in /usr/share/nginx/www/secondapp. in my default conf i setup that in / root localization i want first app: when write 9.9.9.9 in browser show me first app, and when i write 9.9.9.9/makeup, there not show me seccond app.

Why first app displays me good, and seccondapp cannot? Please help me.

Sorry for quality here pasterbin code: enter link description here

 server {
  listen 80;

  server_name localhost;
  root /usr/share/nginx/www/firstapp/web;

  access_log /var/log/nginx/$host.access.log;
  error_log /var/log/nginx/error.log error;

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

  location / {
    root   /usr/share/nginx/www/firstapp/web/;
    index app.php;
    try_files $uri @rewriteapp;


  }

   location /makeup/ {
    alias   /usr/share/nginx/www/seccondapp/web/;
    index app.php;
    try_files $uri @rewriteapp;


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

  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  location ~ ^/(app|app_dev)\.php(/|$) {
    #fastcgi_pass   127.0.0.1:9000;
fastcgi_pass unix:/var/lib/php5-fpm/www.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    fastcgi_param  HTTPS              off;
#fastcgi_param  SERVER_PORT 80;
  }

© Server Fault or respective owner

Related posts about nginx

Related posts about vhost