Foreword: Baidu's results are very good, and some articles say that others are pitted, but he himself is also pitted. Seek the conscience of the industry. Still Google is reliable.
System Environment: Both Ubuntu 13 and Linux Mint 15 pass.
The default installation is nginx 1.2.5, php5.4.9
Install first:
sudo apt-get install nginx php5-fpm
I am Tested on the newly installed Ubuntu13, really only install these two things is enough.
Then edit the configuration file.
sudo gedit /etc/nginx/site-available/default
Note that if you edit with gedit instead of vi, you should edit the default file under site-available, if it is edit The default under site-enabled, because gedit saves by default will generate a backup of "default" & rdquo; this backup will also be used as an enabled configuration file by nginx and error can not be started. The insurance practice is to manually delete the backup file after editing the file under site-available.
Find the location ~ \\.php$, 5 lines uncomment, become like this:
location ~ \\.php$ {# fastcgi_split_path_info ^(.+ \\.php)(/.+)$;# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini## # With php5-cgi alone:# fastcgi_pass 127.0.0.1:9000;# # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params;}This becomes!
Starting nginx:
sudo service nginx start
Extension:
1. In the default file, find index index.html index.html ;
This line is added to
index index.html index.htm index.php;
This allows you to use the php file as the default home page
In the 2.default file, in the location{ { indicator of the server{} indicator, add
autoindex on;
When there is no index file in the folder, the file will be automatically indexed. .
3. The root line of the server{} indicator is the root directory of the file. You can modify that folder as the root directory of the website.
Reference: http://ubuntuhandbook.org/index .php/2013/10/install-nginx-php5-mysql-lemp-ubuntu-1310/
Please indicate the source: http://blog.csdn.net/hursing
The Windows 7 and Ubantu dual system are installed on the computer. Since the Linux system
As the website runs, the MySQL database is getting bigger and bigger, and the backup proble
Install TOMCAT and JDK under Linux Step 1: Create a new boss user, username: boss, password
linux system - file sharing a file sharing premise 1 windows and linux ping pass test methods as fol
Linux ubuntu12.04 Uninstall and install mysql
Ubuntu - grubrescue master boot fix
How to share windows with virtual machine linux
Inux virtual machine network configuration method and solution to the problem
Linux shared wifi to Android phone
7 commands to check and collect Linux hardware information
Linux system shutdown and restart command
Ubuntu disk cleanup protection
Ssh-remote login centos7070 port
Linux mount hard disk error "you must specify the filesystem type"
Linux SSH Session replication function implementation method
Change the IP address of the Win 2003 network adapter
Win8 improved one-click mount VHD virtual disk tutorial
Solution for the lack of c disk space when upgrading Win10 system
Win10 system under the windows function application can not open the solution
Windows can't start windows audio service?
Win7 handles two methods of nvstreamsvc.exe error
How to directly open the Google translation page of Win7 system