Gagal Install Nginx
Daripada “dipamerin” temen, denger sana-sini yang katanya web/blog nya yang udah pada ganti webserver dari apache, lighttpd terus NginX. Yang katanya lebih cepet, lebih mudah.. ahh.. kepingin coba juga deh. Terus seperti biasa langsung ke blognya vivex (salah satu blog favorit saya kalau belajar hehehe) soalnya biasanya doi kasih tutor nya mudah
Dan ternyata memang sudah ada tutorial nya howto install nginx, ya udah deh langsung praktek aja sesuai dengan yang disana
Dan memang berhasil..
Tapi.. ada tapinya nih.. blog yang sudah saya ganti webserver nya dengan nginx kalau kita buka domain utama sih lancar sumicar
tapi pas buka sub-directory (misal: domain.com/folder) gitu engga bisa dibuka alias error. 2 haru “utak-utek” configurasi nya sambil googling engga bisa bisa juga.. jadi untuk sementara nyerah deh hahahaha..
Nginx configurasi yang digunakan kira-kira seperti ini :
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
#———————————————————————-
# Events Module
#
# http://wiki.codemongers.com/NginxEventsModule
#
#———————————————————————-
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main ‘$remote_addr – $remote_user [$time_local] $request ‘
‘”$status” $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” “$http_x_forwarded_for”‘;
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# The default server
#
server {
listen 80;
server_name dirmanto.web.id www.dirmanto.web.id;
index index.php index.html index.htm;
root /home/pakdir/public_html;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /home/pakdir/public_html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache’s document root
# concurs with nginx’s one
#
#location ~ /\.ht {
# deny all;
#}
}
}
Ya udah deh entar dicoba lagi..






2 Responses to Gagal Install Nginx
phery
May 21st, 2010
at 9:05 am
kalo aku sih buat blog mending yang biasa aja mas. Asal masih bisa rutin posting dan bisa blogwalking. Tujuan ngeblog kan itu. permasalahan dapet duit dari ngeblog….. itu rejeki masing2
Keluarga Dirmanto
May 21st, 2010
at 4:38 pm
setuju, mas. maunya sih rutin posting
siap, habis ini mau sering-sering blogwalking ah hehehe.. iya katanya banyak yang dapet duit dari ngeblog, yah semoga saja rejeki juga datang ke blog ini hehehe…