Home > Operation and Maintenance > Nginx > Do you know how to configure folder access permissions?

Do you know how to configure folder access permissions?

王林
Release: 2020-08-19 17:23:45
forward
3997 people have browsed it

Do you know how to configure folder access permissions?

Environment:

Win10 x64

nginx

(Recommended tutorial: nginx tutorial)

Problem analysis:

The project requires a small http file access service to provide http access to files in a certain Linux folder and files in a new folder.

Solution:

Since nginx is loaded in my project, changes are made in the configuration file to support file and file (picture) access.

Method steps:

1. Open the nginx configuration file nginx.conf;

2. Add

 user root; //使用root用户
Copy after login

3 at the beginning of the configuration file. Add server Port customization

server {
        listen       8088;
        server_name  localhost;
       location / {
            root   /home/ubuntu/Desktop/folder;  // 设置访问根目录
            autoindex on;
        }
Copy after login


4. Save and restart nginx.

The above is the detailed content of Do you know how to configure folder access permissions?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template