Open pptfz opened 3 months ago
I refer to baikal-docker The configuration file of nginx in ckulka/baikal: 0.94-nginx provided by the project is configured, but access is still problematic
server {
listen 80;
server_name mydomain;
root /opt/vipkid/baikal/html;
index index.php;
rewrite ^/.well-known/caldav /dav.php redirect;
rewrite ^/.well-known/carddav /dav.php redirect;
charset utf-8;
location ~ /(\.ht|Core|Specific) {
deny all;
return 404;
}
location ~ ^(.+\.php)(.*)$ {
try_files $fastcgi_script_name =404;
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
#fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_pass 10.246.214.34:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ /.ht {
deny all;
}
}
I re-installed nginx version 1.20 on centos7, reconfigure, why is the access result still 404
server {
listen 80;
server_name mydomain;
root /opt/vipkid/baikal/html;
index index.php;
rewrite ^/.well-known/caldav /dav.php redirect;
rewrite ^/.well-known/carddav /dav.php redirect;
charset utf-8;
location ~ /(\.ht|Core|Specific) {
deny all;
return 404;
}
location ~ ^(.+\.php)(.*)$ {
try_files $fastcgi_script_name =404;
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
#fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_pass 10.246.214.34:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ /.ht {
deny all;
}
}
Baikal version: 0.x
Specific
andconfig
folders to the new installationProblem:
My browser visits the deployed project and finds no front-end style
Here is my nginx configuration file I am now deploying this service in k8s and forwarding it through an nginx (installed in vm), what is wrong with my configuration file