iv. configuration of nginx support PHP
Build a LNMP environment under Ubuntu. Compile and install mysql,nginx,php. Finally, install the composer under the Lnmp premise and install the Laravel frame. Fourth step, configure Nginx support PHP.
first set up a directory to store Web page files, execute "sudo mkdri/usr/local/server/www". Then go to the directory, "cd/usr/local/server/www".
Modify The nginx.confand execute the command "sudo vim/usr/local/server/nginx/conf/nginx.conf". Change the line to 2 as shown
- Figure 1
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/77/F1/wKiom1Zxg7DwsMbbAAAj6Auyz5A299.png "style=" float: none; "title=" 1.png "alt=" Wkiom1zxg7dwsmbbaaaj6auyz5a299.png "/>
Figure 2
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/77/F0/wKioL1Zxg7nQt4weAAA0b32AKls095.png "style=" float: none; "title=" 2.png "alt=" Wkiol1zxg7nqt4weaaa0b32akls095.png "/>
Remove the 65-71 comment and modify it to Figure 4:
Figure 3
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/77/F1/wKiom1Zxg7GBv9RDAABlxoIaUYY396.png "style=" float: none; "title=" 3.png "alt=" Wkiom1zxg7gbv9rdaablxoiauyy396.png "/>
Figure 4
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/77/F0/wKioL1Zxg7qRJVxqAACCYrK1bc8549.png "style=" float: none; "title=" 4.png "alt=" Wkiol1zxg7qrjvxqaaccyrk1bc8549.png "/>
3. Create a index.php file under/var/local/server/www, execute command: sudo vim/var/local/server/www/index.php, write the following in it; <?php Phpinfo ();? >
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/77/F1/wKiom1Zxg7LyrFw-AAA6X1e6RrM548.png "style=" float: none; "title=" 5.png "alt=" Wkiom1zxg7lyrfw-aaa6x1e6rrm548.png "/>
4. Restart the nginx. Execute command: Sudo/etc/init.d/nginx reload
5. open localhost in the browser, or an error in the nginx.conf configuration file if the following occurs.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/77/F1/wKiom1Zxg7LC5H8SAAA9INF6tGU202.png "style=" float: none; "title=" 6.png "alt=" Wkiom1zxg7lc5h8saaa9inf6tgu202.png "/>
Workaround: Modify the nginx.conf file.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/77/F0/wKioL1Zxg7vx538uAABlNdGjYNc783.png "style=" float: none; "title=" 7.png "alt=" Wkiol1zxg7vx538uaablndgjync783.png "/>
Then restart Nginx. Then open localhost in the browser.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/77/F1/wKiom1Zxg7SB0ihyAAEMPU_LdPg738.png "style=" float: none; "title=" 8.png "alt=" Wkiom1zxg7sb0ihyaaempu_ldpg738.png "/>
Since then, the configuration Nginx supports PHP completion.
This article from the "Good Learning Day Up" blog, please be sure to keep this source http://sunrising.blog.51cto.com/10729461/1725441
Iv. Configuration of Nginx support PHP