Answer the question
In order to leave comments, you need to log in
What to write in Nginx config to serve .html?
There is this config:
server {
listen 0.0.0.0:80;
server_name doc.ixley.ru;
root /var/www/doc.ixley.ru/out/;
index index.html index.htm;
}
Answer the question
In order to leave comments, you need to log in
You can try something like this:
server {
listen 80;
server_name doc.ixley.ru;
root /var/www/doc.ixley.ru/out/;
index index.html index.htm;
location / {
try_files $uri $uri.html $uri/ =404;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question