Nginx: Instalasi: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
New page: Instalasi Nginx saja sudo apt-get install nginx Instalasi lengkap dengan mysql dan PHP sudo apt-get install nginx php5 php5-xmlrpc php5-mysql php5-gd php5-cli php5-curl \ mysql-clien...
 
Onnowpurbo (talk | contribs)
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Jika ada apache, lakukan
sudo service apache2 stop
Instalasi Nginx saja
Instalasi Nginx saja


  sudo apt-get install nginx
  sudo su
apt update
apt -y install nginx


Instalasi lengkap dengan mysql dan PHP
Instalasi lengkap dengan mysql dan PHP, kira2 seperti di bawah ini,


  sudo apt-get install nginx php5 php5-xmlrpc php5-mysql php5-gd php5-cli php5-curl \
  sudo su
apt update
apt -y install nginx php5 php5-xmlrpc php5-mysql php5-gd php5-cli php5-curl \
  mysql-client mysql-server
  mysql-client mysql-server
==Cek / Test==
Restart nginx
/etc/init.d/nginx restart
/etc/init.d/nginx reload
akses melalui web
http://ip-address
http://localhost
akan keluar kata-kata
Welcome to nginx!
==Konfigurasi Default==
Folder HTML default
root /usr/share/nginx/html;
Konfigurasi nginx
/etc/nginx/sites-enabled/default
chmod -Rf 755 /usr/share/nginx
chown -Rf nobody.nogroup /usr/share/nginx
Untuk mengubah document root supaya tidak bentrok, ubah /etc/nginx/sites-enabled/default
root /var/www/html;


==Pranala Menarik==
==Pranala Menarik==

Latest revision as of 21:44, 14 July 2020

Jika ada apache, lakukan

sudo service apache2 stop

Instalasi Nginx saja

sudo su
apt update
apt -y install nginx

Instalasi lengkap dengan mysql dan PHP, kira2 seperti di bawah ini,

sudo su
apt update
apt -y install nginx php5 php5-xmlrpc php5-mysql php5-gd php5-cli php5-curl \
mysql-client mysql-server

Cek / Test

Restart nginx

/etc/init.d/nginx restart
/etc/init.d/nginx reload

akses melalui web

http://ip-address
http://localhost

akan keluar kata-kata

Welcome to nginx!


Konfigurasi Default

Folder HTML default

root /usr/share/nginx/html;

Konfigurasi nginx

/etc/nginx/sites-enabled/default
chmod -Rf 755 /usr/share/nginx
chown -Rf nobody.nogroup /usr/share/nginx

Untuk mengubah document root supaya tidak bentrok, ubah /etc/nginx/sites-enabled/default

root /var/www/html;


Pranala Menarik