简单的说,其实没啥差别,关键的一点,记住下面几个Nginx的Flags:
last – 基本上都用这个Flag。
break – 中止Rewirte,不在继续匹配
redirect – 返回临时重定向的HTTP状态302
permanent – 返回永久重定向的HTTP状态301
另外,有个东西很关键,曾经折腾我好几个小时才搞定,就是Nginx里面配置 {m,n} 这样的正则规则的时候,条件必须加上双引号,否则总是报错无法通过,官方文档里面真是很难找到这些东西,很晕。
简单的说,其实没啥差别,关键的一点,记住下面几个Nginx的Flags:
last – 基本上都用这个Flag。
break – 中止Rewirte,不在继续匹配
redirect – 返回临时重定向的HTTP状态302
permanent – 返回永久重定向的HTTP状态301
另外,有个东西很关键,曾经折腾我好几个小时才搞定,就是Nginx里面配置 {m,n} 这样的正则规则的时候,条件必须加上双引号,否则总是报错无法通过,官方文档里面真是很难找到这些东西,很晕。
不错,Michael这个经验值得分享,虽然我用Nginx和Lighttp不多,呵呵,我绝大部分服务器还是Apache,一直担心某些功能在这些新的服务器上无法满足,还有稳定性也是我作为核心服务器的一个最大需求。正考虑是否在核心服务上也使用Nginx和lighttpd,不知michael有什么高见。
[Comment ID #29689 Will Be Quoted Here]
放心使用吧,youtube使用的是lighttpd,毫无问题,国内外若干网站使用着,Nginx经过实际测试,不会比lighttpd差,都可以放心使用,从我的经验来看,都比apache好使 🙂 也许是因为我对apache 掌握不够透彻才有此片面的看法。
实际经验证明,在配置较差的机器,或者目前运行apache,但是load较高的机器上,使用nginx可能明显感受到性能的提升
如果 nginx 有 apache 的.htacess文件就方便了,不用每次改规则都要 restart
没必要restart的,加个参数就可以了,自动加载配置的。具体参数忘记了,自己–help吧
Heya this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML.
I’m starting a blog soon but have no coding know-how so I wanted to get advice from someone with experience.
Any help would be greatly appreciated!
Way cool! Some extremely valid points! I appreciate you writing this article and also the rest of the
site is extremely good.
Thanks for the marvelous posting! I actually enjoyed reading it, you’re a great author.
I will always bookmark your blog and definitely will come back sometime soon. I want to
encourage you to continue your great writing, have a nice morning!
Heya exceptional blog! Does running a blog such as this
take a great deal of work? I’ve virtually no expertise
in computer programming but I was hoping to start my own blog in the near future.
Anyway, should you have any suggestions or techniques for new blog owners
please share. I know this is off subject nevertheless I simply wanted to ask.
Cheers!
Hi! This is kind of off topic but I need some guidance from an established blog.
Is it very hard to set up your own blog? I’m not very techincal but
I can figure things out pretty fast. I’m thinking about making
my own but I’m not sure where to start. Do you have any points or suggestions?
Thanks
I just like the helpful information you provide to your articles.
I’ll bookmark your weblog and check again here regularly.
I am somewhat certain I will learn many new stuff proper right here!
Best of luck for the next!
Excellent beat ! I wish to apprentice whilst you amend your website, how
could i subscribe for a blog web site? The account helped me a appropriate deal.
I were tiny bit acquainted of this your broadcast offered shiny transparent idea
each time i used to read smaller content that also clear their motive, and that is also happening with this paragraph which I am reading here.
Hi there, I think your web site might be having web browser compatibility issues.
When I look at your blog in Safari, it looks fine however,
when opening in Internet Explorer, it has some overlapping issues.
I just wanted to give you a quick heads up! Aside from that, fantastic blog!
Excellent way of explaining, and nice article to obtain facts concerning my
presentation focus, which i am going to present in university.
I always used to read piece of writing in news papers but now as I am a user
of internet therefore from now I am using net for
articles, thanks to web.
Hey! Would you mind if I share your blog with my myspace group?
There’s a lot of people that I think would really appreciate your content.
Please let me know. Thank you
Hi there this is kinda of off topic but I was wanting to know if
blogs use WYSIWYG editors or if you have to manually code with HTML.
I’m starting a blog soon but have no coding expertise so I wanted to get guidance from someone
with experience. Any help would be greatly appreciated!
I pay a visit each day a few web sites and blogs to read content,
however this blog provides feature based writing.
Hey there! I know this is somewhat off topic but I was
wondering which blog platform are you using for this website?
I’m getting tired of WordPress because I’ve had issues with hackers and I’m looking at options for another platform.
I would be great if you could point me in the direction of a good
platform.
I know this web site provides quality based posts and other data, is there any other web
site which provides these kinds of information in quality?
I seriously love your site.. Great colors & theme.
Did you make this site yourself? Please reply back as I’m hoping to create my own blog
and would like to know where you got this from or just what the theme is named.
Cheers!
Thank you for any other wonderful article. The place else may just anyone get
that type of information in such an ideal approach of writing?
I have a presentation subsequent week, and I’m at
the look for such info.
Thanks for sharing your info. I really appreciate your efforts and I will be waiting for
your further post thank you once again.
I think that is among the most vital information for me.
And i’m glad reading your article. However wanna remark on few normal things, The web site style is perfect,
the articles is truly excellent : D. Good job, cheers
My developer is trying to persuade me to move to .net from
PHP. I have always disliked the idea because of the expenses.
But he’s tryiong none the less. I’ve been using Movable-type on numerous websites for
about a year and am anxious about switching to another platform.
I have heard good things about blogengine.net. Is there a way
I can transfer all my wordpress posts into it?
Any help would be really appreciated!
My brother suggested I would possibly like this website.
He was totally right. This post actually made my
day. You cann’t imagine just how a lot time I had spent for this information!
Thanks!
Howdy would you mind letting me know which
hosting company you’re using? I’ve loaded your blog in 3 different browsers and
I must say this blog loads a lot faster then most. Can you suggest a good web hosting provider
at a fair price? Many thanks, I appreciate it!
I was wondering if you ever thought of changing the structure of your website?
Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content so people could
connect with it better. Youve got an awful lot of text for only having one or two pictures.
Maybe you could space it out better?
Wonderful goods from you, man. I have understand your stuff previous to and you’re
just too magnificent. I really like what you have acquired
here, certainly like what you are stating and the
way in which you say it. You make it enjoyable and you still care for to keep it wise.
I cant wait to read much more from you. This is really a tremendous website.
If you desire to increase your experience simply keep visiting this
web site and be updated with the most recent news update
posted here.
Yes! Finally someone writes about Best CBD Oil.
This blog is literally the best community anywhere!
I read it everyday, and I’m also so grateful I found https://ibusinessgeek.com, it helped me not
only make money online fast but from home too, hope it helps some others!
It’s actually a great and helpful piece of information. I’m satisfied that you
simply shared this helpful info with us. Please stay us up to date like this.
Thank you for sharing.
Wow, this article is nice, my younger sister is analyzing these things, thus I am going to let
know her.
Excellent article! We will be linking to this great content on our site.
Keep up the great writing.
We absolutely love your blog and find most of your post’s to be exactly I’m looking for.
can you offer guest writers to write content to suit your
needs? I wouldn’t mind creating a post or elaborating on most of the subjects you write related to here.
Again, awesome blog!