ข้ามไปที่เนื้อหาหลัก

การแก้ไข Permalinks ของ wordpress ใช้งานไม่ได้ บน Ubuntu

เมื่อติดตั้ง Wordpress ลงใน Ubuntu server แล้วหากเราลองเปลี่ยนค่า Permarlink แล้วจะไม่สามารถใช้งานได้ โดยเราจะใช้ได้แต่ค่า Default เท่านั้น ซึ่งเป็นเพราะโมดูล rewrite นั้นไม่ได้เปิดให้ทำการใช้งาน ในการแก้ปัญหา ทำได้ดังนี้
1. ให้เราทำการ Login server ด้วย terminal หรือ SSH

2. เปลี่ยนสิทธิเป็น root และทำการเปิดใช้โมดูลด้วยคำสั่ง
a2enmod rewrite (ซึ่งเป็นโมดูลของ apache2)

3. ทำการแก้ไข Default virtaul host ของ apache2
nano /etc/apache2/sites-available/default



Options Indexes FollowSymLinks MultiViews
AllowOverride none
Order allow,deny
allow from all



ให้เปลียนเป็น



Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all



reload apache2
sudo /etc/init.d/apache2 force-reload


restart apache2
sudo /etc/init.d/apache2 restart


ความคิดเห็น