LNMP environment is currently used in our domestic webmaster Linux VPS Configuration environment used more. As a novice we are likely to see the author similar "Lnmp installation Tutorial" and then according to gourd painting scoop to install the VPS. We have found in the environment we are more commonly used in the WordPress pseudo static does not take effect, the internal page 404 error page. This problem is very good to solve, because we LNMP adopted is nginx, not Apache, so not as direct as Apache throw htaccess file to the site root directory can be effective pseudo static.
First, there are already pseudo static files wordpress.conf files in "/usr/local/nginx/conf/wordpress.conf" in the default installed LNMP environment, and we can check if the compiled code inside is:
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;
}
If not, we need to modify the above code file to rewrite the jump pseudo static.
Second, we need a profile that belongs to our site:
/usr/local/nginx/conf/vhost/www.***.org.conf (automatically name your own domain name)
We'll see code similar to the following, see the thick line Part I added, you can add it to:
server {
Listen 80;
server_name www.***.org;
Index index.html index.php;
Include wordpress.conf;
Finally, we login to the VPS with SSH, and then restart the LNMP with the following command
/ROOT/LNMP restart
After performing the above three steps, we have not solved the pseudo static problem, the other common CMS is the same, in the default conf basically contains the CMS pseudo static compiler script that we need.
Article Source: http://www.laozuo.org/490.html, reprint please indicate the source.