» nginx の記事

~ nginx repo on centos 7 ~

connie 2020.11.27 | centos | | No Comments

nano /etc/yum.repos.d/nginx.repo

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

yum update && yum upgrade
rpm -qa | grep nginx
yum remove nginx-mod-http-image-filter nginx-mod-stream nginx-mod-mail nginx-mod-http-perl nginx-all-modules nginx-mod-http-xslt-filter nginx-filesystem

service nginx restart

~ nginx+php No input file specified problem ~

connie 2013.04.14 | centos | | No Comments
nano /etc/nginx/conf.d/default.conf
location ~ \.php$ {
        root           /usr/share/nginx/html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

將fastcgi_param 改為

fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
service nginx restart

完成

yum --enablerepo=remi install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-soap 

 

~ nginx Permission notes ~

connie 2013.04.09 | centos | | No Comments
chmod 755 folder

 

~ nginx setting php sock in ubuntu(android) ~

connie 2013.04.08 | ubuntu | | No Comments
nano /etc/php5/fpm/pool.d/www.conf
;listen = 127.0.0.1:9000
listen = /tmp/php5-fpm.sock
listen.owner = www-data //same as nginx user
listen.group = www-data
listen.mode = 0666
nano /etc/nginx/sites-available/default
location ~ \.php$ {
            fastcgi_pass   unix:/tmp/php5-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /var/www$fastcgi_script_name;
            include        fastcgi_params;
        }

 

| HOME |

Smiley face

February 2021
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28