# The alias don't show

**URL:** <https://www.ruby-forum.com/t/the-alias-dont-show/186285>\
**Category:** NGINX\
**Created:** [April 3, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/the-alias-dont-show/186285 "2010-04-03T18:11:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michel\_Vega\_Fuenzal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@Michel\_Vega\_Fuenzal](https://www.ruby-forum.com/u/Michel_Vega_Fuenzal)\
**Post date:** [April 3, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/the-alias-dont-show/186285/1 "2010-04-03T18:11:10Z")

</div>

Hi list, sorry my english.

I can show .php files, with this configuration in the file www.misito.cu  
in /etc/nginx/site-enable/:  
server {  
listen www.miserver.cu:80;  
server\_name www.misito.cu;  
access\_log /var/log/nginx/access-miserver.log;  
error\_log /var/log/nginx/error-miserver.log;

```
location / {
    root /var/www/test;
    index index.php;
}

location ~ \.php$ {
    include /etc/nginx/fastcgi_params;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
   fastcgi_param SCRIPT_FILENAME 

```

/var/www/test$fastcgi\_script\_name;  
}  
}

I like show the Web S. that is in /home/pepe/SCJM/, that have like  
index file: index.php, all this Site is in .php file, when I add that at  
the file www.misitio.cu:  
location /SCJM {  
root /home/michelvf;  
index index.php;  
}

the browser: [http://www.misitio.cu/SCJM/](http://www.misitio.cu/SCJM/), show this text:  
No input file specified.

Bat when I do that:  
cd /var/www/test/  
ln -s /home/pepe/SCJM

the browser yes show the Web S…

Who I cant show the Site in /home/pepe/SCJM that have file .php using  
the location directive?

Regards.

–  
Usemos el Software Libre “Con todos y para el bien de todos”  
José Martí, 26 de noviembre de 1891, Tampa.

Lic. Michel Vega Fuenzalida. Usuario Linux: 353763  
Coordinador del Grupo Linux Pinero  
Administrador de Red  
Hospital General Docente “Héroes de Baire”,  
Nueva Gerona, Isla de la Juventud, Cuba.

Teléfono: +53 46 323012.

–

Este mensaje le ha llegado mediante el servicio de correo electronico  
que ofrece Infomed para respaldar el cumplimiento de las misiones del  
Sistema Nacional de Salud. La persona que envia este correo asume el  
compromiso de usar el servicio a tales fines y cumplir con las  
regulaciones establecidas

Infomed: [http://www.sld.cu/](http://www.sld.cu/)

---

<div class="post-metadata">

**Author:** ![Michel\_Vega\_Fuenzal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@Michel\_Vega\_Fuenzal](https://www.ruby-forum.com/u/Michel_Vega_Fuenzal)\
**Post date:** [April 3, 2010, 11:34pm UTC](https://www.ruby-forum.com/t/the-alias-dont-show/186285/2 "2010-04-03T23:34:51Z")

</div>

Hello!

On Sat, Apr 03, 2010 at 12:10:05PM -0400, Michel Vega Fuenzalida wrote:

> location / {  
> }  
> No input file specified.
> 
> Bat when I do that:  
> cd /var/www/test/  
> ln -s /home/pepe/SCJM
> 
> the browser yes show the Web S..
> 
> Who I cant show the Site in /home/pepe/SCJM that have file .php  
> using the location directive?

You have to tell nginx that php files under /SCJM should be  
processed under /home/michelvf. Note that for regexp locations  
order matters, so it should be specified before generic .php  
location. I.e. you should write something like this:

```
location / {
    root /var/www/test;
    ...
}

location /SCJM {
    root /home/michelvf;
    ...
}

location ~ ^/SCJM/.*\.php$ {
    fastcgi_pass ...
    fastcgi_param SCRIPT_FILENAME 

```

/home/michelvf$fastcgi\_script\_name;  
…  
}

```
location ~ \.php$ {
    fastcgi_pass ..
    fastcgi_param SCRIPT_FILENAME /var/www/test$fastcgi_script_name;
    ...
}

```

Maxim D.
