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

Do you know how to configure folder access permissions?

王林
王林forward
2020-08-19 17:23:453933browse

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用户

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;
        }


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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete