apt-get install.2 Configure nginx
Before using nginx, create an nginx directory under/home/bookxiao/to store resource files, and then create a soft connection to conf, sbin, and logs under/usr/local/nginx, avoid frequent directory switching.
bookxiao@ubuntuforfun:~/
1 ls 2 git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git 3 ls 4 wget h ttp://nginx.org/download/nginx-1.8.0.tar.gz 5 ls 6 tar–xvf nginx-1.8.0.tar.gz 7 tar--xvf Nginx-1.8.0.tar. GZ 8 TAR-XVF nginx-1.8.0.tar.gz 9 ls cd NGINX-1.8.0/11 ls/configure--u
:getpwnam ("Nginx") failed6. Create the directory used in the compilation parameters Mkdir-p/var/tmp/nginx/client/, or after installing Nginx will be reported that the directory does not exist 7. Compile and install Nginx[[email protected] ~]# tar-zxf nginx-1.12.2.tar.gz[[em
:49] ERROR:FPM initialization failed start PHP-FPM found a lack of configuration files/usr/local/php/etc/php-fpm.conf just copy php at this timeThe-FPM configuration file/usr/local/php/etc/php-fpm.conf.default to the corresponding/usr/local/php/etc/php-of the configuration file provided when PHP is installedfpm.conf [[email protected]
duplicate IN/USR/LOCAL/NGINX-1.4.1/ Conf/vhost/test.ttlsa.com.conf:13
nginx:configuration file/usr/local/nginx-1.4.1/conf/nginx.conf test failed
6. Can I use SSI variables only?of course not, whatever you write, it can be an SSI instruction, it can be a nginx variable
1. #tar XF nginx-1.4.2.tar.gz2, #cd nginx-1.4.23, #./configure--prefix=/usr/local/nginx--conf-path=/etc/nginxExecutive post: error:the HTTP rewrite module requires the PCRE library. is a description of the missing Pcre-devel package,# RPM-QA |grep pcre result pcre-7.8-6.el6.
that this article is only On debian 7 (wheezy. Other operating systems are configured and installed on other operating systems, which cannot guarantee consistency. For more information about apache installation and configuration, see the previous article.
2:InstallNginx php5-cgi php5-fpm spawn-fcgi
# Apt-get install nginx-full nginx-common php5-cgi php5-fpm spawn-fcgi
3:Configure various php. ini
You can
We want to create an nginx server with the proxy ip address 192.168.0.101. The local machine acts as the test master and the local ip address is 192.168.0.234.Nginx Proxy Server ConfigurationFirst, configure the yum Source[Root @ server70 ~] # Yum groupinstall-y "Development Tools" "Development Libraries"[Root @ server70 ~] # Yum install gcc openssl-devel pcre-devel zlib-devel-yLftp 192.168.0.254Download na
.
Global configuration command
Syntax:Include File|Mask;
Default Value: None
Context: arbitrary
It can be used in any context to introduce the commands in other configuration files into the context where the include command is used. The introduced commands must comply with the syntax and context requirements. Example:
http { include mime.types; include vhosts/*.conf;}
Introduce the files ending with ".
insideVim/usr/local/nginx/conf/vhost/taobap.cn.confLimit_conn one 10;3. Restart Nginx:killall-hup nginx======================================== Exercises ===================================1. To MySQL official download a source package, try to compile the installation, compile parameters can refer to the MySQL we have installed the compilation parameters. Operat
on three servers. The proxy_pass command is written as follows:# Configuration information of all backend servers in the clusterUpstream Upload ATS {Server 192.168.0.11: 8080 weight = 10;Server 192.168.0.11: 8081 weight = 10;Server 192.168.0.12: 8080 weight = 10;Server 192.168.0.12: 8081 weight = 10;Server 192.168.0.13: 8080 weight = 10;Server 192.168.0.13: 8081 weight = 10; # p # Page title # e #}Location /{Proxy_pass http: // invalid ATS; # reverse proxyInclude proxy.
The 1.Nginx configuration file consists mainly of:The instructions in this section of main (global configuration) will affect all other parts.Server (Virtual host configuration) This part of the instruction is primarily used to specify the virtual host domain name, IP, and port.Upstream (mainly reverse proxy, load balancer related configuration) This part of the instruction is used to set up the reverse proxy and backend servicesLoad balancing of the
while installing Nginx.
./configure: error: the HTTP rewrite module requires the PCRE library.
Install pcre-devel to solve the problem
yum -y install pcre-devel
Error message:
./configure: error: the HTTP cache module requires md5 functionsfrom OpenSSL library. You can either disable the module by using--without-http-cache option, or install the OpenSSL library into the system,or build the OpenSSL library statically from the source with
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.