This article introduces the nginx + php + mysql solution under Debian5VPS. this solution uses php-fpm as the fastcgi Process Manager. This article is based on the 64-bit Debian5VPS. if it is a 32-bit DebianVPS, modify it in the corresponding section. Php must be re-compiled when you use php-fpm. you cannot use the built-in p. This article introduces the nginx + php + mysql solution under Debian 5 VPS, this solution uses php-fpm as the fastcgi Process Manager.
This article is based on the 64-bit Debian 5 VPS. if it is a 32-bit Debian VPS, modify it in the corresponding section.
When using php-fpm, php must be re-compiled, and the built-in php cannot be used. MySQL comes with Debian. Nginx is the latest version downloaded from the official Debian software library.
Install Nginx
The nginx version of Debian 5 is relatively low. The latest stable version of Nginx 0.7.61 and the latest version of nginx will be included in Debian 6, after testing, we found that nginx can run under Debian 5. Installation Command:
In addition, run the dpkg-L nginx command to check which directories the nginx files are installed in.
The default webpage directory of nginx in Debian is/var/www/nginx-default. this directory is not created during installation and we create it manually.
When you access nginx through a browser, you can see the default web page of nginx, which means nginx is working properly!
Install MySQL
Run the following command to install MySQL that comes with Debian:
Note: The nginx configuration file in Debian differs greatly from that in centos. Debian splits the configuration into multiple files. we recommend that you use one site and one configuration file, we modified/etc/nginx/sites-enabled/default. In addition, the/var/www/nginx-default/section following the fastcgi_param parameter is a specific webpage Directory. if it is written as $ document_root in Debian, I don't know why it doesn't work.
Restart nginx:
/Etc/init. d/nginx/restart
Then access the test. php page in the browser, the http://ubuntuone.cn should be able to correctly display, reboot VPS test, each module should be able to bring their own boot. Success!
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.