Home  >  Article  >  Backend Development  >  nginx+php+mysql+vsftp服务器之注意点

nginx+php+mysql+vsftp服务器之注意点

WBOY
WBOYOriginal
2016-06-23 13:38:50814browse

一.nginx的启动

在 Unix-like 系统上, 非 root 用户只能使用 1024 之上的端口。所以, 默认的 80 端口就无效了。网上查了下主要有两种方法,一种是利用端口映射nginx配置如8080端口,同时将80端口影射到8080上,还有一种办法是直接通过80端口启动,命令如下:

cd /opt/nginx/sbin

方法一:
所有用户都可以运行(因为是755权限,文件所有者:root,组所有者:root)

chown root:root nginx
chmod 755 nginx
chmod u+s nginx


二.php的数据目录的权限

PHP工程目录必须是启动php用户,否则access denied


三.mysql和php同用户,否则访问不了mysql,却这少那


四.FTP服务上传的文件,文件上传后的权限自然是FTP用户的,而用root用户拷贝后,文件还是保持不变,需要chown才能改变,PHP用户和FTP用户不一致的时候,这是个问题

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn