tp3.2 nginx server
摘要:server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /www/web; index index.html index.php; location / { index index....
阅读全文
nginx 限制访问
摘要:IP限制 //修改server配置文件 allow 192.168.137.2; deny all; auth basic auth_basic "Admin only" auth_basic_user_file /etc/nginx/.htpassed //安装htpasswd sudo apt install apach2-utils sudo htpasswd -...
阅读全文
负载均衡 、 静态缓存
摘要:upstream project { server 22.22.22.2:3000; server 22.22.22.3:3000; server 22.22.22.5:3000; } server { listen 80; location / { proxy_pass http://project; } location ~* \.(css|js|...
阅读全文
php5-fpm.sock failed (13: Permission denied) error
摘要:In order to fix the php5-fpm.sock failed error follow these instructions 1) Make sure your virtual hosts nginx (.conf) files are using fastcgi_pass un
阅读全文
php-fpm
摘要:install php-fpm # Ubuntu sudo apt-get install python-software-properties; sudo add-apt-repository ppa:ondrej/php5-5.6; sudo apt-get update; sudo apt-g
阅读全文
yum install nginx
摘要:先安装nginx的yum源http://nginx.org/en/linux_packages.html#stable找到链接,安装:rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el...
阅读全文
nginx 配置多个二级域名
摘要:server { server_name domain.com www.domain.com *.domain.com ; set $subdomain ''; if ...
阅读全文
apache 转 nginx .htaccess
摘要:http://www.winginx.com/en/htaccess
阅读全文
nginx安全相关设置
摘要:Nginx默认是显示版本号,隐藏# vim nginx.conf在http {—}里加上server_tokens off; 如:http {……省略server_tokens off;http://www.cnblogs.com/ilanni/archive/2014/10/08/4010321....
阅读全文
服务器环境配置nginx / php / php-fpm(二)
摘要:php.ini调优 一、 最大内存: memory_limit 表示单个进程能够占用的最大内存,默认为128M,适用于大多数中小型网站。设置一个合适的数值取决于以下因素: php能够使用的最大内存。如果你的主机内存为2G,其中还有其他的服务,例如mysql,nginx,memcache等,那么设置为
阅读全文
服务器环境配置nginx / php / php-fpm(一)
摘要:在配置文件中有 include=/etc/php-fpm.d/*.conf , 表示池定义 pool definition 在php-fpm.d目录下 建立 /etc/nginx/conf.d/example.conf
阅读全文