[solved] Nginx setup for serve Meteor/public html files

server {
	listen 80;
	listen [::]:80 ipv6only=on default_server;
	index index.html;
        root /home/me/myProject/public/katalog;
	server_name example.com;
	location / {
    proxy_pass http://localhost:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header X-Forwarded-For $remote_addr;

		try_files $uri.html $uri/ =404;

I’m trying to setup nginx root and serve clean url for static html files (from public/katalog) without .html extensions,
but it didn’t work, although meteor app works ok, and example.com/katalog/file.html also viewed ok,
is it correct way?
may be, there is another way for serve static plain html files? please advise

problem solved by additional location block:

location  /katalog  {
		root /home/me/myProject/public;
  		try_files $uri.html $uri/ =404;

Thank all for help)

1 Like