Life is a toss, strong two days to see a restful API design, I think the general small companies may be open for convenience without these.
But it mentions HTTPS to improve the security of the API, this point I think is very important, so use the weekend to build an environment like this.
After looking for a lot of tutorials on the internet is not very good, for me such a novice is simply too difficult, but fortunately is found a very good website Osyunwei, can Baidu a bit.
The first step: refer to this tutorial: http://www.osyunwei.com/archives/8867.html
All the way down there is no big problem, at the end of the visit to PHP, found not parsing PHP code. After careful examination found that the location of the nginx.conf is wrong.
Confirm that the location of the nginx.conf is:/usr/local/nginx/conf/nginx.conf
After the modification, restart, can access the PHP website.
Step two: Start configuring HTTPS
This step is more than a pit, but in fact it is relatively simple, the configuration under the Nginx is finished.
Reference Tutorial: http://www.cnblogs.com/yanghuahui/archive/2012/06/25/2561568.html
Remember in the iptables inside open 443 port, is not open the harm I looked for one or two hours of the problem.
Step Three: Configure the local DNS server (because I am a local test, so domain name Resolution requires a server, if you are on-line server operation, this step is not, and not much use)
Reference Tutorial: http://www.osyunwei.com/archives/689.html
This tutorial has a place to pay attention to, look at the picture
There are three places:
1, Vi/var/named/chroot/etc/named.rfc1912.zones #添加正向解析区域及反向解析区域
2, Vi/var/named/chroot/var/named/osyunwei.com.zone #编辑正向区域文件
3, Vi/var/named/chroot/var/named/192.168.21.zone #编辑反向区域文件
centos6.5 build nginx php mysql, and HTTPS