Cara Menambahkan PHP ke Directory Index pada server Ubuntu

Biasanya Apache akan mulai melihat file index.html sebelum index.php. Anda dapat mengubah urutan itu dengan mengedit file “dir.conf”. Gunakan perintah berikut:
sudo nano /etc/apache2/mods-enabled/dir.conf
Anda akan melihat sesuatu seperti ini:

<ifmodule mod_dir.c="">
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</ifmodule>

Sekarang pindahkan "index.php" ke bagian awal sehingga akan terlihat seperti ini:

<ifmodule mod_dir.c="">
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</ifmodule>

Setelah selesai tekan Control+O untuk menyimpan kemudian Control+X untuk keluar dari layar editor nano.

Was this answer helpful?

Related Articles

How to turn off the VPS?

Please Login to Mikyhost = > Click VPS Package = > Click Shut Down thanks,

How do I turn on my VPS?

Please Login to Mikyhost = > Click VPS Package = > Click Power on   thanks,

How to Reset VPS Password?

Resetting password on VPS Package Please Login at Mikyhost = > Click VPS Package = > Click...

How to Restart VPS?

How do I restart the VPS? Please Login to Mikyhost => VPS PACKAGE => CLICK REBOOT

How to reinstall/rebuild VPS

Please enter the VPS Panel and click Rebuild and select the images to be reinstalled. thanks,