# Why my php file in subdirectory doesn't work？

**URL:** <https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281>\
**Category:** NGINX\
**Created:** [September 28, 2011, 4:57am UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281 "2011-09-28T04:57:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 28, 2011, 4:57am UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/1 "2011-09-28T04:57:18Z")

</div>

Hello everyone，

I am working on an centos6 with nginx 1.0.6, php 5.3.6, and fpm.

I found that php file in my subdirectory returns a 404,but in nginx home  
direcory works fine.

For example , a phpinfo.php file works fine in /data/web/, where  
/data/web is my nginx document root. Buy the same file in /data/web/sub,  
the browser and nginx both tell a 404 error.

Here is my nginx config file:

```
server {
    listen 80;
    server_name abc.example.com;

    location / {
        root /data/web/;
        index index.html index.htm index.php;

location ~ .*\.(php|php5)?$
    {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    include fastcgi.conf;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 128k;
    }
    }
    }

```

btw, static file such as html works fine.

Thans a lot.

Posted at Nginx Forum:

> **[why my php file in subdirectory doesn't work？](https://forum.nginx.org/read.php?2,215921,215921#msg-215921)**
>
> Hello everyone， I am working on an centos6 with nginx 1.0.6, php 5.3.6, and fpm. I found that php file in my subdirectory returns a 404,but in nginx home direcory works fine. For example , a phpinfo.php file works fine in /data/web/, where /data/web...

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [September 28, 2011, 5:04am UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/2 "2011-09-28T05:04:04Z")

</div>

Hello.

You shoude set (fastcgi\_param SCRIPT\_FILENAME) .

example:  
location ~ .\*.(php|php5)?$  
{  
fastcgi\_param SCRIPT\_FILENAME /data/web/$1;

```
   }

```

On Wed, Sep 28, 2011 at 10:56 AM, baalchina [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ```
> fastcgi_busy_buffers_size 128k;
> 
> ```
> 
> Posted at Nginx Forum:  
> [http://forum.nginx.org/read.php?2,215921,215921#msg-215921](http://forum.nginx.org/read.php?2,215921,215921#msg-215921)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
douban:www.douban.com/people/mustang/

blog: www.pagefault.info

twitter: [www.twitter.com/minibobo](http://www.twitter.com/minibobo)

weibo: [Sina Visitor System](http://www.weibo.com/diaoliang)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [October 11, 2011, 4:54pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/3 "2011-10-11T16:54:14Z")

</div>

I have similar problem. I can get the index.php to display in the  
document root, but when I type [www.mydomain.com/administrator](http://www.mydomain.com/administrator) it will  
not pull the index.php, but if I type  
[www.mydomain.com/administrator/index.php](http://www.mydomain.com/administrator/index.php), it will bring the page up. So  
is this a configuration file issue or a rewrite issue. I need to resolve  
this due to the fact I have some joomla installs that have a root joomla  
install and then a subdirectory of joomla installed and I must be able  
to get the server to respond to the sub-directory index.php files.

I am new to NGINX and let me say it is awesome, but I still have a lot  
to learn.

Thx  
Suttles

Posted at Nginx Forum:

> **[Re: why my php file in subdirectory doesn't work？](https://forum.nginx.org/read.php?2,215921,216516#msg-216516)**
>
> Hello everyone， I am working on an centos6 with nginx 1.0.6, php 5.3.6, and fpm. I found that php file in my subdirectory returns a 404,but in nginx home direcory works fine. For example , a phpinfo.php file works fine in /data/web/, where /data/web...

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [October 11, 2011, 5:22pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/4 "2011-10-11T17:22:03Z")

</div>

I have the variable set, or at least I think I do. Here is my config for  
the vhost.

server {  
client\_max\_body\_size 20M;  
listen 1192;  
# .domain.com will match both [domain.com](http://domain.com) and  
[anything.domain.com](http://anything.domain.com)  
server\_name [rentavault.net](http://rentavault.net);

```
    # It is best to place the root of the server block at the server

```

level, and not the location level  
# any location block path will be relative to this root.  
root /home/www/rentavault\_net;

```
    # It's always good to set logs, note however you cannot turn off

```

the error log  
# setting error\_log off; will simply create a file called  
‘off’.  
access\_log /home/www/rentavault\_net/logs/access\_log.log main;  
error\_log /home/www/rentavault\_net/logs/error\_log.log info;

```
    # This can also go in the http { } level
    index index.php index.html;

    location / {
            # if you're just using wordpress and don't want extra

```

rewrites  
# then replace the word @rewrites with /index.php  
try\_files $uri $uri/ @rewrites;  
}  
location ~ ^/cgi-bin/(awredir|awstats).pl {  
gzip off;  
fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_param SCRIPT\_FILENAME  
$document\_root/cgi-bin/cgi-bin.php;  
fastcgi\_param X\_SCRIPT\_FILENAME  
/home/www/rentavault\_net/$fastcgi\_script\_name;  
fastcgi\_param X\_SCRIPT\_NAME $fastcgi\_script\_name;  
include fastcgi\_params;  
}

This config will not let me access the sub directory without index.php  
in the path of the browser. Very frustrating.

Posted at Nginx Forum:

> **[Re: why my php file in subdirectory doesn't work？](https://forum.nginx.org/read.php?2,215921,216519#msg-216519)**
>
> Hello everyone， I am working on an centos6 with nginx 1.0.6, php 5.3.6, and fpm. I found that php file in my subdirectory returns a 404,but in nginx home direcory works fine. For example , a phpinfo.php file works fine in /data/web/, where /data/web...

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [October 11, 2011, 5:17pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/5 "2011-10-11T17:17:43Z")

</div>

Thanks!

You should set index directive. example: “index index.html index.php”

On Tue, Oct 11, 2011 at 10:53 PM, suttles [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> to learn.  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
douban:www.douban.com/people/mustang/

blog: www.pagefault.info

twitter: [www.twitter.com/minibobo](http://www.twitter.com/minibobo)

weibo: [Sina Visitor System](http://www.weibo.com/diaoliang)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [October 12, 2011, 5:41am UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/6 "2011-10-12T05:41:49Z")

</div>

Thanks!

You should add fastcgi\_index index.php.

On Tue, Oct 11, 2011 at 11:21 PM, suttles [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> # It is best to place the root of the server block at the server
> 
> gzip off;
> 
> ```
> 
> in the path of the browser. Very frustrating.
> 
> Posted at Nginx Forum:  
> [http://forum.nginx.org/read.php?2,215921,216519#msg-216519](http://forum.nginx.org/read.php?2,215921,216519#msg-216519)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
douban:www.douban.com/people/mustang/

blog: www.pagefault.info

twitter: [www.twitter.com/minibobo](http://www.twitter.com/minibobo)

weibo: [Sina Visitor System](http://www.weibo.com/diaoliang)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [October 12, 2011, 8:20pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/7 "2011-10-12T20:20:38Z")

</div>

Ok, tried that, I have a suspicion that I may have a load balancer issue  
happening as well. Will report back. I was suppose to add fastcgi\_index  
to the line of

index index.php index.html;

to look like  
index fastcgi\_index index.php index.html;

right?

Thx  
Doug

Posted at Nginx Forum:

> **[Re: why my php file in subdirectory doesn't work？](https://forum.nginx.org/read.php?2,215921,216602#msg-216602)**
>
> Hello everyone， I am working on an centos6 with nginx 1.0.6, php 5.3.6, and fpm. I found that php file in my subdirectory returns a 404,but in nginx home direcory works fine. For example , a phpinfo.php file works fine in /data/web/, where /data/web...

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [October 17, 2011, 6:20pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/8 "2011-10-17T18:20:27Z")

</div>

Update on my problem… if the URL is typed this way  
[http://www.domain.com/subdirectory](http://www.domain.com/subdirectory) it will not pull up the site, but  
when the URL is typed [http://www.domain.com/subdirectory/](http://www.domain.com/subdirectory/) the site comes  
up immediately. How to do force nginx to put the trailing slash onto the  
subdomains?

Posted at Nginx Forum:

> **[Re: why my php file in subdirectory doesn't work？](https://forum.nginx.org/read.php?2,215921,216831#msg-216831)**
>
> Hello everyone， I am working on an centos6 with nginx 1.0.6, php 5.3.6, and fpm. I found that php file in my subdirectory returns a 404,but in nginx home direcory works fine. For example , a phpinfo.php file works fine in /data/web/, where /data/web...

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 11:31am UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/9 "2012-01-06T11:31:53Z")

</div>

On 06/01/2012 07:37, gigabyte wrote:

> ```
> fastcgi_param SCRIPT_FILENAME $sroot/$fastcgi_script_name ;
> 
> ```

I suspect this should be

fastcgi\_param SCRIPT\_FILENAME $document\_root$fastcgi\_script\_name;

Regards

Ian

–  
Ian H.  
31 Sheerwater, Northampton NN3 5HU,  
Tel: 01604 513875  
Preparing eBooks for Kindle and ePub to give the best reader experience.

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 8:37am UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/10 "2012-01-06T08:37:41Z")

</div>

I have the same problem with subdirectories. My config Is:  
set $sroot /usr/local/www/  
location ~ .php$ {  
include /usr/local/etc/nginx/fastcgi\_params;  
fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME $sroot/$fastcgi\_script\_name ;  
fastcgi\_param QUERY\_STRING $query\_string;  
fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_intercept\_errors on;  
break;  
}

```
location / {
   root $sroot ;
   index index.php;
}

```

By the way I think it all happend when I’ve upgraded from nginx 0.9 to  
1.0.11. I think that my original configs had been replaced with new  
ones.

Posted at Nginx Forum:

> **[Re: why my php file in subdirectory doesn't work？](https://forum.nginx.org/read.php?2,215921,220863#msg-220863)**
>
> Hello everyone， I am working on an centos6 with nginx 1.0.6, php 5.3.6, and fpm. I found that php file in my subdirectory returns a 404,but in nginx home direcory works fine. For example , a phpinfo.php file works fine in /data/web/, where /data/web...

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 11:37am UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/11 "2012-01-06T11:37:26Z")

</div>

On Mon, Oct 17, 2011 at 11:19 PM, suttles [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Update on my problem… if the URL is typed this way  
> [http://www.domain.com/subdirectory](http://www.domain.com/subdirectory) it will not pull up the site, but  
> when the URL is typed [http://www.domain.com/subdirectory/](http://www.domain.com/subdirectory/) the site comes  
> up immediately. How to do force nginx to put the trailing slash onto the  
> subdomains?

either

location = /subdirectory {  
rewrite ^ $uri/?$args permanent;  
}

or

try\_files $uri $uri/ =404;

or

symlink in root instead of redefining root in location /subdirectory/

or

location /subdirectory {  
…  
}  
##note that this one kind of not what you expect.  
/subdirectorysomething will match this location.

–  
O\< ascii ribbon campaign - stop html mail - [www.asciiribbon.org](http://www.asciiribbon.org)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 12:39pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/12 "2012-01-06T12:39:55Z")

</div>

I’ve already tried meny variations including this one. In fact I’m using  
it right now with some modifications:

```
location / {
    root $sroot;
    index index.php index.html index.htm;
    if (-e $request_filename) {
        break;
    }
    rewrite ^/(.+)$ /index.php?q=$1 last;
}
 if ($host !~* ^www\.) {
    rewrite ^(.*)$ http://www.$host$1 permanent;
}

location = /administrator {
    rewrite ^ $uri/?$args permanent;
}

location ~ \.php$ {
    root $sroot;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME

```

$document\_root$fastcgi\_script\_name;  
include /usr/local/etc/nginx/fastcgi\_params;  
}

```
location ~ /\.ht {
    deny all;
}

```

But it keeps redirecting me to document\_root instead of  
document\_root/subdirectory

Also I know that It worked before some one put his hands on my config  
files.

## hobson42 Wrote:

> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,215921,220872#msg-220872](http://forum.nginx.org/read.php?2,215921,220872#msg-220872)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 12:41pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/13 "2012-01-06T12:41:48Z")

</div>

On Fri, Jan 6, 2012 at 6:39 PM, gigabyte [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve already tried meny variations including this one. In fact I’m using  
> it right now with some modifications:

Post the full config.

–  
O\< ascii ribbon campaign - stop html mail - [www.asciiribbon.org](http://www.asciiribbon.org)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 1:26pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/14 "2012-01-06T13:26:23Z")

</div>

Here is my full config  
server {

```
set $sroot /services/www/site;

listen 192.168.170.1:80;
server_name site.net www.site.net;
access_log /var/log/nginx/site.net.access.log main;
error_log /var/log/nginx/site.net.error.log info;

location = /administrator {
    root $sroot/administrator;
}

location / {
    root $sroot;
    index index.php index.html index.htm;
    if (-e $request_filename) {
        break;
    }
    rewrite ^/(.+)$ /index.php?q=$1 last;
}
 if ($host !~* ^www\.) {
    rewrite ^(.*)$ http://www.$host$1 permanent;
}

location ~ \.php$ {
    root $sroot;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME

```

$document\_root$fastcgi\_script\_name;  
include /usr/local/etc/nginx/fastcgi\_params;  
}

```
location ~ /\.ht {
    deny all;
}

```

}

## Edho A. Wrote:

> On Fri, Jan 6, 2012 at 6:39 PM, gigabyte  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I’ve already tried meny variations including  
> > this one. In fact I’m using  
> > it right now with some modifications:
> 
> Post the full config.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,215921,220874#msg-220874](http://forum.nginx.org/read.php?2,215921,220874#msg-220874)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 2:46pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/15 "2012-01-06T14:46:50Z")

</div>

## No, this did not work either. nginx keeps looking for for relative files in a directory, but has to do it in /administrator directory Maybe some other suggestions ? Edho A. Wrote:

> –  
> O\< ascii ribbon campaign - stop html mail -  
> [www.asciiribbon.org](http://www.asciiribbon.org)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,215921,220882#msg-220882](http://forum.nginx.org/read.php?2,215921,220882#msg-220882)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 1:49pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/16 "2012-01-06T13:49:16Z")

</div>

On Fri, Jan 6, 2012 at 7:26 PM, gigabyte [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Here is my full config  
> server {

Try this instead:

[http://pastie.org/3137133](http://pastie.org/3137133)

–  
O\< ascii ribbon campaign - stop html mail - [www.asciiribbon.org](http://www.asciiribbon.org)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 2:49pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/17 "2012-01-06T14:49:18Z")

</div>

On Fri, Jan 6, 2012 at 8:46 PM, gigabyte [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> No, this did not work either.  
> nginx keeps looking for for relative files in a directory, but  
> has to do it in /administrator directory  
> Maybe some other suggestions ?

What do you mean? Are the files located in  
/services/www/site/administrator/administrator/?

–  
O\< ascii ribbon campaign - stop html mail - [www.asciiribbon.org](http://www.asciiribbon.org)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 3:02pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/18 "2012-01-06T15:02:17Z")

</div>

the Root directory is /services/www/site/

When I login into the index.php which is located in  
/services/www/site/administrator  
nginx redirects me to index.php which is located in the root directory -  
/services/www/site

When I manually enter [site.net/administrator/index.php](http://site.net/administrator/index.php) it opens the  
right file but all relative links on it (css,js, ,…etc) are being  
loaded from root directory (/services/www/site) and thay should be  
loaded from subdirectory (/services/www/site/administrator) and that is  
why I’m getting many 404 responses from server.

## Edho A. Wrote:

> –  
> O\< ascii ribbon campaign - stop html mail -  
> [www.asciiribbon.org](http://www.asciiribbon.org)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,215921,220885#msg-220885](http://forum.nginx.org/read.php?2,215921,220885#msg-220885)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 3:08pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/19 "2012-01-06T15:08:29Z")

</div>

On Fri, Jan 6, 2012 at 9:01 PM, gigabyte [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> loaded from subdirectory (/services/www/site/administrator) and that is  
> why I’m getting many 404 responses from server.

Looks like application configuration problem.

–  
O\< ascii ribbon campaign - stop html mail - [www.asciiribbon.org](http://www.asciiribbon.org)

---

<div class="post-metadata">

**Author:** ![baalchina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@baalchina](https://www.ruby-forum.com/u/baalchina)\
**Post date:** [January 6, 2012, 3:24pm UTC](https://www.ruby-forum.com/t/why-my-php-file-in-subdirectory-doesnt-work/212281/20 "2012-01-06T15:24:34Z")

</div>

## May be but this all started when I’ve updated nginx from 1.0.4 to 1.0.9 This update erased all my previous config files and I’ve started from beginning and stuck on this problem Edho A. Wrote:

> > 
> 
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)  
> Posted at Nginx Forum:  
> [http://forum.nginx.org/read.php?2,215921,220888#msg-220888](http://forum.nginx.org/read.php?2,215921,220888#msg-220888)
