Nginx有什么优点?为什么选择Nginx做web服务器软件?

Nginx有什么优点?为什么选择Nginx做web服务器软件?,第1张

Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Ramblerru 站点开发的,它已经在该站点运行超过两年半了。Igor 将源代码以类BSD许可证的形式发布。尽管还是测试版,但是,Nginx 已经因为它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名了。nginx是一个小巧而高效的Linux下的web服务器软件。开发人员 Igor Sysoev 来自俄罗斯,nginx的话其实已经在一些俄罗斯的大型网站上运行多年,相当的稳定,最近才在美国开始知名起来。而另外一个热门的web服务器软件是Lig>Discuz X:
在 nginx下的配置文件nginxconf添加
location / {
rewrite ^([^\])/topic-(+)\html$ $1/portalphpmod=topic&topic=$2 last;
rewrite ^([^\])/article-([0-9]+)-([0-9]+)\html$ $1/portalphpmod=view&aid=$2&page=$3 last;
rewrite ^([^\])/forum-(\w+)-([0-9]+)\html$ $1/forumphpmod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\])/thread-([0-9]+)-([0-9]+)-([0-9]+)\html$
$1/forumphpmod=viewthread&tid=$2&extra=page%3D$4&page=$3
last;
rewrite ^([^\])/group-([0-9]+)-([0-9]+)\html$ $1/forumphpmod=group&fid=$2&page=$3 last;
rewrite ^([^\])/space-(username|uid)-(+)\html$ $1/homephpmod=space&$2=$3 last;
rewrite ^([^\])/([a-z]+)-(+)\html$ $1/$2phprewrite=$3 last;
if (!-e $request_filename) {
return 404;
}
}
正则表达式可以用相应的版本在后台伪静态设置里获取apache

第一步:从>

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/13508815.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-08-21
下一篇 2023-08-21

发表评论

登录后才能评论

评论列表(0条)

保存