Odavde http://slackbuilds.org/repository/13.37/network/nginx/ skinuti :
Source Downloads:
nginx-1.2.2.tar.gz (53105bbe3ac9319db54d9eb46119695b)
Download SlackBuild:
nginx.tar.gz
Zatim otpakovati paket nginx.tar.gz
Code: Select all
tar zxf nginx.tar.gz
Code: Select all
cp nginx-1.2.2 nginx/
Code: Select all
cd nginx
Code: Select all
chmod +x nginx.SlackBuild
Code: Select all
./nginx.SlackBuild
http://slackbuilds.org/slackbuilds/14.0 ... inx/README pogledajte tu...
zatim instalirati paket:
Code: Select all
installpkg /tmp/nginx-1.2.2-i486-1_SBo.tgz
Nakon toga promenite dozvole rc.nginx-a u izvrsne:
Code: Select all
chmod +x /etc/rc.d/rc.nginx
Code: Select all
/etc/rc.d/rc.nginx start
Na adresi http://localhost se nalazi vas, za sad html sadrzaj!!!!
Code: Select all
nano /etc/nginx/nginx.conf
Code: Select all
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include 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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /var/www;
index index.html index.htm index.php;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
#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 /var/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
include fastcgi_params;
}
#location ~ /\.ht {
# deny all;
#}
}
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
include /etc/nginx/conf.d/*.conf;
}
Code: Select all
nano /etc/rc.d/rc.php-cgi
Code: Select all
#!/bin/sh
# /etc/rc.d/rc.php-cgi
# Start/stop/restart
# Da se php-cgi startuje automatski prilikom boot-a, ...
# u zvrsni: chmod +x /etc/rc.d/rc.php-cgi
#
case "$1" in
'start')
echo "Starting php-cgi"
/usr/bin/php-cgi -b 127.0.0.1:9000 &
;;
'stop')
echo "Shutdown php-cgi"
killall php-cgi
;;
'restart')
echo "Shutdown php-cgi....."
killall php-cgi
sleep 3
echo "Starting php-cgi..."
/usr/bin/php-cgi -b 127.0.0.1:9000 &
;;
*)
echo "Usage: $0 {start|stop|restart}"
;;
esac
Code: Select all
chmod +x /etc/rc.d/rc.php-cgi
Code: Select all
/etc/rc.d/rc.php-cgi start
Code: Select all
nano /var/www/index.php
Code: Select all
<?php echo 'radi :)'; ?>
Code: Select all
chown -R nobody:nobody /var/www
http://localhost/index.php
se nalazi vasa php skripta
httpd(apache) - slekver 1337 --> WSI
phpmyadmin -slekver 1337 --> WSI