lnmp的一个设置问题求解
环境如下:
1、nginx php-fpm 的执行用户和用户组均是 www id 500
2、为了安全新建一个站点,aaa.com,/usr/sbin/useradd -g www aaa
新建aaa用户加入nginx和php-fpm所在用户组,
``
在用户home目录下建立www目录放置网站,可是权限都是0777了,文件的所有者是aaa,服务器是centos 6.7
nginx的错误日志还是2016/03/02 10:09:57 [crit] 21803#0: *59 stat() "/home/aaa/sites/aaa.com/index.php" failed (13: Permission denied), client: XXXX.XXXX.XXXX.XXXX, server: aaa.com, request: "GET / HTTP/1.1", host: "aaa.com"
求解?是我设置的不对吗?
按理说只要是www的最起码应该可执行啊。
回复内容:
环境如下:
1、nginx php-fpm 的执行用户和用户组均是 www id 500
2、为了安全新建一个站点,aaa.com,/usr/sbin/useradd -g www aaa
新建aaa用户加入nginx和php-fpm所在用户组,
``
在用户home目录下建立www目录放置网站,可是权限都是0777了,文件的所有者是aaa,服务器是centos 6.7
nginx的错误日志还是2016/03/02 10:09:57 [crit] 21803#0: *59 stat() "/home/aaa/sites/aaa.com/index.php" failed (13: Permission denied), client: XXXX.XXXX.XXXX.XXXX, server: aaa.com, request: "GET / HTTP/1.1", host: "aaa.com"
求解?是我设置的不对吗?
按理说只要是www的最起码应该可执行啊。
截图一下 看看网站web目录的权限

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Steps to create a Docker image: Write a Dockerfile that contains the build instructions. Build the image in the terminal, using the docker build command. Tag the image and assign names and tags using the docker tag command.

You can query the Docker container name by following the steps: List all containers (docker ps). Filter the container list (using the grep command). Gets the container name (located in the "NAMES" column).

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

Create a container in Docker: 1. Pull the image: docker pull [mirror name] 2. Create a container: docker run [Options] [mirror name] [Command] 3. Start the container: docker start [Container name]

Docker container startup steps: Pull the container image: Run "docker pull [mirror name]". Create a container: Use "docker create [options] [mirror name] [commands and parameters]". Start the container: Execute "docker start [Container name or ID]". Check container status: Verify that the container is running with "docker ps".

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

Docker uses container engines, mirror formats, storage drivers, network models, container orchestration tools, operating system virtualization, and container registry to support its containerization capabilities, providing lightweight, portable and automated application deployment and management.
