Beberapa hari yang lalu saya coba installkan blog wordpress teman pada vps. Setting permalink saya set ke "Custom Structure → /%category%/%postname%/", file .htaccess baru sudah otomatis tersetup namun ketika test buka halaman posting website error (Not Found).
Berikut Solusinya:
Cek dulu apakah modul mod_rewrite sudah aktif pada webserver apache, login ssh & ketikkan command:
apachectl -M
[bash highlight="6"]
[root@victor ~]# apachectl -M
Loaded Modules:
...
...
alias_module (shared)
rewrite_module (shared)
...
...
cgi_module (shared)
version_module (shared)
...
...
python_module (shared)
ssl_module (shared)
Syntax OK
[/bash]
Jika modul rewrite sudah aktif (rewrite_module (shared)) → baris ke-6 pada code di atas, kemungkinan AllowOverride pada file konfigurasi apache (httpd.conf) masih di set ke "None" (AllowOverride None).
Edit value "AllowOverride None" ke "AllowOverride All" pada file httpd.conf (/etc/httpd/conf/httpd.conf) untuk semua dokumen root direktori (biasanya "/var/www/html") → lihat baris ke-17 pada code di bawah.
[apache highlight="17"]
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
[/apache]
Restart apache daemon:
[bash collapse="false"]
[root@victor ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@victor ~]#
[/bash]
Selesai, refresh halaman yang tadinya tidak bisa di buka (Not Found).
Link 2 My Blog
If you find this blog useful or feel it would be useful to link from your blog or website, I would be extremely appreciative if you place this hyperlink code below to your site.
<a href="http://linggihnote.blogspot.com/" target="_blank"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx3jAGDB9ZDuc1ODWdIK3SPJBeIZF71xHZRwJSucIeJoSXiC3L7UmGUVaWIcT8O_e-5ulL1UykmZF8lH6H-k49Nc0-zNFVHE7T75Aj1vrqutqV8PwjjL1TvFsCAoiCjaoPIBv7IyreXpKR/s1600/Logo_Icon.png" /></a> |
Recent Posts |
Tidak ada komentar:
Posting Komentar