Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front-end static page lost #1253

Open
pptfz opened this issue Apr 3, 2024 · 2 comments
Open

Front-end static page lost #1253

pptfz opened this issue Apr 3, 2024 · 2 comments

Comments

@pptfz
Copy link

pptfz commented Apr 3, 2024

Baikal version: 0.x

  • [✅ ] I have searched open and closed issues for duplicates
  • [✅ ] I have installed the release zip, not the source code zip
  • [✅ ] I have moved the whole, untouched Specific and config folders to the new installation

Problem:

My browser visits the deployed project and finds no front-end style
image

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

server {
  listen       80;
  server_name  domain;

  root  /opt/vipkid/baikal/html;
  index index.php;


  rewrite ^/.well-known/caldav /dav.php redirect;
  #rewrite ^/$ /dav.php redirect;
  rewrite ^/.well-known/carddav /dav.php redirect;

  dav_methods PUT DELETE MKCOL COPY MOVE;

  location ~ /(\.ht|Core|Specific|config) {
    deny all;
    return 404;
  }
  
  charset utf-8; 

  location ~ ^(.+\.php)(.*)$ {
    try_files $fastcgi_script_name =404;
    include        /etc/nginx/fastcgi_params;
    fastcgi_split_path_info  ^(.+\.php)(.*)$;
    fastcgi_pass  10.246.214.34:9000;
    fastcgi_index index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    fastcgi_param  PATH_INFO        $fastcgi_path_info;
  }
}
@pptfz
Copy link
Author

pptfz commented Apr 3, 2024

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

image

@pptfz
Copy link
Author

pptfz commented Apr 3, 2024

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant