Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 in browser show me first app, and when i write, 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
  location ~ ^/(app|app_dev)\.php(/|$) {
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;
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.