INSTALL PHP

 

SETTING APACHE2 STANDAR WITH PHP, HTACCESS


==================================================================

INSTALL APACHE2

==================================================================


sudo apt-get update


sudo apt-get install apache2 -y


sudo systemctl restart apache2





==================================================================

INSTALL PHP

==================================================================

sudo apt-get update


sudo apt-get install -y php libapache2-mod-php php-mysql

   

#extentions php

sudo apt-get install -y php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip php-imagick





==================================================================



.HTACCESS

DOMAIN TUNGGAL


RewriteEngine on

RewriteCond %{HTTP_HOST} ^8.8.8.8$ [NC]

RewriteRule ^(.*)$ http://.1.1.1.1/$1 [L,R=301,NC]


SUB DOMAIN


RewriteEngine on

RewriteBase /poker88/

RewriteCond %{HTTP_HOST} ^8.8.8.8$ [NC]

RewriteRule ^(.*)$ http://.1.1.1.1/$1 [L,R=301,NC]









==================================================================


INDEX.PHP 301


<?php header("Location: http://.1.1.1.1/", true, 301);








HTACCESS

==================================================================

tambahkan ini

<Directory /var/www/html>

    Options Indexes FollowSymLinks

    AllowOverride All

    Require all granted

</Directory>


di dalam 000-default.conf nya


tu setelah di simpan

ketikan kode ini lewat putty

sudo a2enmod rewrite

sudo systemctl restart apache2












Cara install server


https://www.youtube.com/watch?v=M2kCRFSaHsY













Komentar