Difference between revisions of "Nginx: Instalasi"

From OnnoWiki
Jump to navigation Jump to search
Line 1: Line 1:
 
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
  
  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
  
Line 16: Line 20:
 
akses melalui web
 
akses melalui web
  
 +
http://ip-address
 
  http://localhost
 
  http://localhost
  
Line 25: Line 30:
 
==Konfigurasi Default==
 
==Konfigurasi Default==
  
Folder default
+
Folder HTML default
  
 
  root /usr/share/nginx/html;
 
  root /usr/share/nginx/html;
  
Edit file
+
Konfigurasi nginx
 +
 
 +
/etc/nginx/sites-enabled/default
  
vi /etc/nginx/sites-enabled/default
 
 
  chmod -Rf 755 /usr/share/nginx
 
  chmod -Rf 755 /usr/share/nginx
 
  chown -Rf nobody.nogroup /usr/share/nginx
 
  chown -Rf nobody.nogroup /usr/share/nginx
 +
  
 
==Pranala Menarik==
 
==Pranala Menarik==

Revision as of 09:41, 14 June 2020

Instalasi Nginx saja

sudo su
apt update
apt -y install nginx

Instalasi lengkap dengan mysql dan PHP

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

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


Pranala Menarik