Alias which works like in other web servers

marc at corky.net marc at corky.net
Fri Aug 3 15:37:30 MSD 2007


Symlinking is always an option, but, it is not clean nor elegant.  I 
have more than just one of these cases across several sites and using 
symlinks all over the place is not quite what I'm looking for.

Thanks


Wayne E. Seguin wrote:
> 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?
>







More information about the nginx mailing list