我正在使用Nginx 1.0.15
我想重定向domain.com> domain.com/wordpress但我仍然希望能够专门浏览domain.com/mycustomdirectory,例如domain.com/files /
这是我当前的配置。这里有重写。
server {
listen 80 default_server;
server_name domain.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
location /twitter {
rewrite ^ http://twitter.com/name permanent;
}
location /music {
rewrite ^ http://domain.com:8080 permanent;
}
location /plus {
rewrite ^ http://gplus.to/name permanent;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}