Previously installed H2O don't know why, always crash, change the Nginx
Download the package:
http://nginx.org/download/
Configuration:
./configure--prefix=/usr/local/nginx--with-http_ssl_module
Installation:
Make-j2
Make install
Start:
/usr/nginx/sbin/nginx
Stop it:
Query Nginx ID
Ps-ef | grep nginx
Calmly stop Nginx:
Kill-quit ID
Restart:
Kill-hup ID
Configuration file path:
/usr/nginx/conf/nginx.conf
Verify that the configuration file format is correct:
Nginx-t-c/usr/nginx/conf/nginx.conf
Or
/usr/nginx/sbin/nginx-t
User root;worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log Logs/error.log I NFO; #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 www.xxx.com; #charset Koi8-r; #access_log Logs/host.access.log Main; Location/{root/home/wwwroot/illl.pub; Index index.html index.htm; } #error_page 404/404.html; # REDIRECT Server error pages to the static page/50x.html # Error_page 502 503 504/50x.html; Location =/50x.html {root html; } # Proxy The PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ {# ProX Y_pass http://127.0.0.1; #} # Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { Fastcgi_buffer_size 128k; Fastcgi_buffers 32k; Root/home/wwwroot/illl.pub; Fastcgi_pass Unix:/tmp/php-fpm.sock; Fastcgi_index index.php; #include fastcgi.conf; Fastcgi_param document_root/home/wwwroot/illl.pub; Fastcgi_param Script_filename/home/wwwroot/illl.pub$fastcgi_script_name; Include Fastcgi_params; } # Deny access to. htaccess files, if Apache ' s document Root # concurs with Nginx ' s one # #lo cation ~/\.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 SSL; # server_name localhost; # ssl_certificate Cert.pem; # Ssl_certificate_key Cert.key; # Ssl_session_cache shared:ssl:1m; # ssl_session_timeout 5m; # ssl_ciphers high:!anull:! MD5; # ssl_prefer_server_ciphers on; # location/{# root HTML; # index index.html index.htm; # } #}}
Compiling and installing Nignix to Linux