Nginx WordPress pseudo Static Setup Tutorial

Source: Internet
Author: User
Tags vps

The comparison of Apache and Nginx on the internet is also a lot of, here will not repeat, there is a chance to explain in detail.

I believe that with WordPress bloggers will use pseudo static, pseudo static benefits of search engine friendly, looks good.

With the virtual host users are mostly using Apache,apache pseudo static WordPress support is very good, almost do not own to edit. Love toss, favorite independent bloggers with VPS or a lot of nginx in the VPS as an erection environment is quite common, but with Nginx when WordPress becomes blind, here on how to set pseudo static Nginx.

We do not need to understand how to write pseudo static, do not need to understand the principle, just follow the method below, your WordPress can be opened under the Nginx pseudo static! Just do it!

Nginx don't need. htaccess

Edit the virtual host's nginx.conf (usr/local/nginx/conf/vhost/domain name. conf. must be your domain name configuration file!), in

server {

Listen 80;

server_name ...

Root ... Add after

Location/{

Index index.html index.php;

if (-f $request _filename/index.html) {

Rewrite (. *) $1/index.html break;

}

if (-f $request _filename/index.php) {

Rewrite (. *) $1/index.php;

}

if (!-f $request _filename) {

Rewrite (. *)/index.php;

}

And then reload Nginx: (This is important)

/etc/init.d/nginx Restart//cenots

End of full text

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.