| |
---|
| | Kemudian tambahkan host untuk domain kita dengan listen 172.0.0.1 untuk mengarahkan nginx ke apache |
---|
| | ``` |
---|
| | # vim /etc/hosts |
---|
| | ``` |
---|
| | <img src="https://git.leon36.web.id/yukitoki/Reverse-Proxy-with-Nginx/raw/master/images/ss-4.jpg" width="400"> |
---|
| | <img src="https://git.leon36.web.id/yukitoki/Reverse-Proxy-with-Nginx/raw/master/images/ss-4.png" width="400"> |
---|
| | |
---|
| | |
---|
| | Installasi dan konfigurasi tools yang dibutuhkan |
---|
| | ============= |
---|
| |
---|
| | ``` |
---|
| | # systemctl restart httpd |
---|
| | ``` |
---|
| | |
---|
| | Selanjutnya lakukan pengecekan php menggunakan curl |
---|
| | |
---|
| | Pertama buat file index.php di setiap dir root website |
---|
| | ``` |
---|
| | # echo "<?php phpinfo();" > /home/nextcloud/test.php |
---|
| | # echo "<?php phpinfo();" > /home/wordpress/test.php |
---|
| | # echo "<?php phpinfo();" > /home/prestashop/test.php |
---|
| | ``` |
---|
| | Selanjut nya ubah kepemilikan dan permission setiap dir root website |
---|
| | ``` |
---|
| | # chown -R nextcloud:nextcloud /home/nextcloud |
---|
| | # chmod -R 755 /home/nextcloud |
---|
| | |
---|
| | # chown -R wordpress:wordpress /home/wordpress |
---|
| | # chmod -R 755 /home/wordpress |
---|
| | |
---|
| | # chown -R prestashop:prestashop /home/prestashop |
---|
| | # chmod -R 755 /home/prestashop |
---|
| | ``` |
---|
| | |
---|
| | Cek versi php dengan curl |
---|
| | Prestashop |
---|
| | ``` |
---|
| | # curl -I prestashop.task.my.id:8080/test.php |
---|
| | ``` |
---|
| | Output: |
---|
| | ``` |
---|
| | HTTP/1.1 200 OK |
---|
| | Date: Sun, 08 Mar 2020 07:27:22 GMT |
---|
| | Server: Apache/2.4.6 (CentOS) |
---|
| | X-Powered-By: PHP/7.1.33 |
---|
| | Content-Type: text/html; charset=UTF-8 |
---|
| | ``` |
---|
| | |
---|
| | Wordpress |
---|
| | ``` |
---|
| | # curl -I wordpress.task.my.id:8080/test.php |
---|
| | ``` |
---|
| | Output: |
---|
| | ``` |
---|
| | HTTP/1.1 200 OK |
---|
| | Date: Sun, 08 Mar 2020 07:29:15 GMT |
---|
| | Server: Apache/2.4.6 (CentOS) |
---|
| | X-Powered-By: PHP/7.2.28 |
---|
| | Content-Type: text/html; charset=UTF-8 |
---|
| | ``` |
---|
| | |
---|
| | Nextcloud |
---|
| | ``` |
---|
| | # curl -I nextcloud.task.my.id:8080/test.php |
---|
| | ``` |
---|
| | Output: |
---|
| | ``` |
---|
| | HTTP/1.1 200 OK |
---|
| | Date: Sun, 08 Mar 2020 07:30:08 GMT |
---|
| | Server: Apache/2.4.6 (CentOS) |
---|
| | X-Powered-By: PHP/7.3.15 |
---|
| | Content-Type: text/html; charset=UTF-8 |
---|
| | ``` |
---|
| | Perhatikan pada bagian X-Powered-By: PHP/ pastikan versi php nya sudah cocok dengan yang kita inginkan |
---|
| | |
---|
| | |