Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 7. Operating System » Langkah – langkah meng-enablekan nginx CI dan Domain

Langkah – langkah meng-enablekan nginx CI dan Domain

tutorial

———–

Masing 2x ethernet0 isikan ini :

auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0

———–

untuk installasi php5-curl yang ada di aplikasi restoran, silahkan tambahkan di source-list sbb :

deb http://security.debian.org/debian-security jessie/updates main

————

1. Extract File Default dari Config yang ada di blog
a. Kopikan file default ke /etc/nginx/site-available/
2. Tambahkan config dibawah ini,kedalam file nginx.conf
——-
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
——-
ke dalam
3. Edit file /etc/php5/fpm/pool.d/www.conf
beri commment ke baris line 39

;listen = /var/run/php5-fpm.sock

–>> Ganti dengan <<–

listen = 127.0.0.1:9000

4. Dari Default File /etc/nginx/site-available/default

Tambahkan Configurasi sbb :
*.
fastcgi_pass 127.0.0.1:9000;

5. Isi File Default

server {
root /var/www/html/hotel;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
#server_name hotel.ikc.com;
location / {
try_files $uri $uri/ /index.php?$args;
#try_files $uri $uri/ =404;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}

}

server {
listen 80;
listen [::]:80;

server_name example.com;

root /var/www/example.com;
index index.html;

location / {
try_files $uri $uri/ =404;
}
}

————–

Salam Sukses

Filed under: 7. Operating System

Leave a Reply

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>