nginx
main configuration:
server {
listen 80;
server_name www.xxx.cn;
-sharpcharset koi8-r;
-sharpaccess_log logs/host.access.log main;
location /admin/ {
root /app/server;
try_files $uri $uri/ /admin/index.html;
}
location / {
root /app/server;
try_files $uri $uri/ /client/index.html;
}
}
now only when you visit www.xxx.cn, you will report 403. If you visit www.xxx.cn/aa, you will have no problem. After taking a look at the solutions on the Internet, you basically say that you want to change your permission. I have the permission to change / app/server/client
and index.html
, but it is still 403.
-----------------update1---------------------------
this is the error_log
of the past two days. The mistakes of the middle two invalid number can be ignored. I wrote it wrong
-update2-
checked again and found that there is a problem with the configuration of selinux
, but I have seen that selinux
is already disabled
on my machine, so it should not be the problem of selinux
? In the past, there was no problem when there was only one entry for the whole website. Since I divided the admin
and client
of the site into two front-end projects, it has been a problem to configure two portals in nginx
.