How to setting permalink wordpress on Nginx

Edit file configurasi VHOST , insert this line  :
include /var/www/namadomain/htaccess;
Create htaccess file in folder /var/www/namadomain/
nano -w /var/www/namadomain/htaccess
Insert or paste this code :
# SAMPLE
# WordPress pretty URLs: (as per dominiek.com)
  if (-f $request_filename) {
  break;
  }
  if (-d $request_filename) {
  break;
  }
  rewrite ^(.+)$ /index.php?q=$1 last;

Restart service nginx, php-fpm, and mysqld
Nginx
/etc/init.d/nginx { start | stop | restart }
PHP-FPM
/etc/init.d/php-fpm { start | stop | restart }
MySQL
/etc/init.d/mysql { start | stop | restart }

Good luck :D

Comments

Popular posts from this blog

Luweng jomblang, grubug, dan kali suci

Morning Happiness with Gus Teja from Bali World Music