国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Questions about nginx configuration
過去多啦不再A夢
過去多啦不再A夢 2017-05-16 17:20:37
0
3
529

The directory structure is as follows:
root
└── data
└── domain.com
└── admin
└── index

The folder admin is the website backend webpage directory
The folder index is the website frontend directory

nginx part configuration is as follows:

location / {
    root /data/domain.com/index;
    index index.html index.htm;
}

location /admin/{
    root /data/domain.com/admin;
    index index.php index.html index.htm;
}

Access http://domain.com is normal, but access http://domain.com/admin/ prompt 404

Could you please tell me how to set up http://domain.com nginx forwarding to the index directory and http://domain.com/admin/nginx forwarding to the admin directory?

過去多啦不再A夢
過去多啦不再A夢

reply all(3)
黃舟

With this configuration, you will find the admin under domain.com/admin

The configuration of root/index will generally be placed under the server, not in the location

Generally configured like this

server {
    root /data/domain.com;
    index index.php index.html index.htm;

    location /{
        try_files $uri $uri/ /index.php?s=$uri&$args;
    }
    ……

}
為情所困

location / put it at the bottom and try it.

phpcn_u1582
location /admin/ {
    root /data/domain.com;
    index index.php index.html index.htm;
}

Second location 中的 root 多了 admin.

If you have any questions, please read the log first. This kind of error will be clear after looking at the log of nginx.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template