Нови статии
bash scripts
CPU-frequency scalin...
Oбновявания на ОС W...
install zoneminder 1...
Installing mysql Mar...
Теми във форума
Нови теми
Малък лек и удобен д...
Клавишни комбинации ...
Инсталация на Arch L...
Защитна стена за мик...
Linux
Най-активни теми
Color console linux [4]
Клавишни комбинац... [1]
Защитна стена за ... [1]
Linux [1]
Малък лек и удобе... [0]
Приятели
Сега
Времето
Йерархия на статиите
Статии » How To » Slackware 14.0 install nginx +php-fpm
Slackware 14.0 install nginx +php-fpm
Slackware: install nginx +php-fpm cd /usr/src/ wget "http://sbopkg.googlecode.com/files/sbopkg-0.36.0-noarch-1_cng.tgz" installpkg sbopkg-0.36.0-noarch-1_cng.tgz
sbopkg


Search nginx > network/nginx http/imap/pop3 proxy > Build Build a package for nginx

nano /etc/nginx/nginx.conf

#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;
root /var/www/htdocs;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
# root html;
root /var/www/htdocs;
index index.php index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

location ~ \.php$ {
root /var/www/htdocs;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME script$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#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;
# }
#}

}



chmod +x /etc/rc.d/rc.nginx
/etc/rc.d/rc.nginx start




cd /var/www/htdocs/
pico index.html




Welcome to Nginx





http://localhost/index.html


pico /etc/nginx/nginx.conf


location ~ \.php$ {
root /srv/httpd/htdocs;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME script$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}



chmod +x /etc/rc.d/rc.php-fpm

/etc/rc.d/rc.php-fpm start

cd /var/www/htdocs/
pico info.php

Link

Example #1 phpinfo() Example

http://localhost/info.php


pico /etc/rc.d/rc.local

# Start Nginx Web server;
if [ -x /etc/rc.d/rc.nginx ]; then
. /etc/rc.d/rc.nginx start
fi

# Start php-cgi;
if [ -x /usr/bin/php-cgi ]; then
. /etc/rc.d/rc.php-cgi start
fi

Публикувана от admin на October 08 2012
Коментари
Няма написани коментари
Напишете коментар
Трябва да сте регистриран за да напишете коментар
Оценки
Оценяването е достъпно единствено за потребителите.

Влезте в акаунта си или се регистрирайте за да можете да давате оценки.

Няма оценки
Вход
Потребител

Парола



Не сте потребител?
Натиснете тук за да се регистрирате.

Забравихте паролата си?
Поискате си нова тук.
Downloads

New Downloads

NAVIGON-Europe ...
NAVIGON Europe ...
NAVIGON Europe ...
NAVIGON Europe ...
µTorrent 3.4.1 ...
BitTorrent 7.9....
ProgDVB 7.04.2 ...
ProgDVB 7.04.2 ...
Wine 1.7.17
sakis3g
Wise Disk Clean...
DAEMON Tools Li...
opam
TurboFTP 6.30 B...
Skype 6.3.73.10...
FileZilla 3.7.0...
ChrisTV 5.75
BSPlayer Pro 2....
Rotativki
SquirrelMail + ...

Top 10 Downloads

n-Track Studio ... [9299]
Super MP3 Downl... [9066]
Registry Mechan... [9046]
Microsoft Secur... [8962]
Rotativki [8147]
Hiren`s v10.0.9 [7765]
K-Lite Mega Cod... [7291]
BitComet 1.21 F... [7231]
Slax + Hiren's ... [5251]
WinSetup From USB [4930]
Ново от Калдата