Alias which works like in other web servers

Wayne E. Seguin wayneeseguin at gmail.com
Fri Aug 3 15:18:08 MSD 2007


On Aug 03, 2007, at 06:18 , Just Marc wrote:
> Hi,
>
> I have a website and a wordpress blog under /blog/   The blog  
> scripts are sitting in a different directory, this is the conf:
>
> server {
>   listen x.x.x.x;
>   root   /var/www/site/;
>
>   location /blog {
>       alias   /var/www/wordpress;
>       rewrite ^.+?(/.*\.php)$ $1 last;
>       rewrite ^ /index.php last;
>   }
>
>   location / {
>       rewrite '^/([^\.]*)\.html$'  /index.php?p=$1 last;
>   }
>
>   location ~ .php$ {
>       fastcgi_pass   10.0.0.1:1026;
>       fastcgi_index  index.php;
>       include        conf/fastcgi.conf;
>   }

Why not symlink /var/www/wordpress to /var/www/site/blog?

--
Wayne E. Seguin
Sr. Systems Architect & Systems Admin
wayneseguin at gmail.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20070803/6a9d00d0/attachment.html>


More information about the nginx mailing list