Welcome! Log In Create A New Profile

Advanced

Re: Questions about Internal named location

Rob Schultz
July 30, 2010 03:46PM
Hi,

On Jul 30, 2010, at 8:31 PM, heimdull wrote:

>
> index.php is displayed in the browser correctly so my question is why
> does the @www location not correctly handle the php file?
>
its because index.php is a real file. It never gets passed off to @www. try_files is for testing real files on the filesystem. And returns that url if it is successful. If it is unsuccesful it is passed off to @www.

> This all started when I tried to setup one nginx server that has
> multiple php sites under one url that needs a alias for the other sites.
> Something like this:
>
> root /var/www/somesite;
>
> location / {
> index.html index.php;
> }
> location /wordpress {
> alias /var/www/wordpress;
> try_files $uri $uri/ @wordpress;
> }
> ....

from the wiki http://wiki.nginx.org/Wordpress
might try this format
location /wordpress {
try_files $uri $uri/ /wordpress/index.php?q=$uri&args;
}

and then have your normal php location block for fastcgi settings.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Questions about Internal named location

heimdull July 30, 2010 02:31PM

Re: Questions about Internal named location

Rob Schultz July 30, 2010 03:46PM

Re: Questions about Internal named location

Igor Sysoev July 30, 2010 03:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready