The deployment and practice of CI in CentOS lnmp

Source: Internet
Author: User

1. Platform: Lnmp CentOS6.4 (64bit) nginx1.2.4+php5.5.7 configuration process encountered problems and processing methods:

1.404 Error:

Cause: An issue with the configuration request path in Nginx

2.405 Error: An error occurred during the post to static file of Nginx.

Log_format Ci3_main'$remote _addr-$remote _user [$time _local] "$request"'                                  '$status $body _bytes_sent "$http _referer"'                                  '"$http _user_agent" "$http _x_forwarded_for "'; server {Listen8089;        server_name www.ainux.com; #charset Koi8-R; Access_log logs/ www. Ainux.com.log ci3_main; Location/{root/data/Ci3;            Index index.php index.html index.htm; Error_page405= $$uri; } error_page404/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 on127.0.0.1: the# #location~\.php$ {# Proxy_pass http://127.0.0.1;#} # Pass the PHP scripts to FastCGI server listening on127.0.0.1:9000# Location~\.php {Root/data/ci;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename/data/ci/$fastcgi _script_name;
include Fastcgi_params;}
Location ~ ^/nginxstatus/{
Stub_status on;
Access_log off;
}

# Deny access to. htaccess files, if Apache ' s document Root
# concurs with Nginx ' s one
#
Location ~/\.ht {
Deny all;
}
}

The configured content after the resolution is:

Log_format Ci3_main'$remote _addr-$remote _user [$time _local] "$request"'                                  '$status $body _bytes_sent "$http _referer"'                                  '"$http _user_agent" "$http _x_forwarded_for "'; server {Listen8089;        server_name www.ainux.com; #charset Koi8-R; Access_log logs/ www. Ainux.com.log ci3_main; Location/{root/data/Ci3;            Index index.php index.html index.htm; error_page 405 =200 $uri;//fix 405 error here, error in post static file } error_page404/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 on127.0.0.1: the# #location~\.php$ {# Proxy_pass http://127.0.0.1;#} # Pass the PHP scripts to FastCGI server listening on127.0.0.1:9000# Location~\.php { root /data/ci3;                Fastcgi_pass 127.0.0.1:9000;                Fastcgi_index index.php;                Fastcgi_param script_filename/data/ci3/$fastcgi _script_name;                Include Fastcgi_params; Fastcgi_split_path_info ^ (. +\.php) (. *)$;        Fastcgi_param path_info $fastcgi _path_info; }
Location ~ ^/nginxstatus/{
Stub_status on;
Access_log off;
}

# Deny access to. htaccess files, if Apache ' s document Root
# concurs with Nginx ' s one
#
Location ~/\.ht {
Deny all;
}
}


The deployment and practice of CI in CentOS lnmp

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.