Answer the question
In order to leave comments, you need to log in
Why does VK not correctly display the site snippet?
I'm running a project on vue-cli via docker (nginx). Here is nginx.conf:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
map $status $expires {
default off;
301 1h;
}
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types
application/atom+xml
application/geo+json
application/javascript
application/x-javascript
application/json
application/ld+json
application/manifest+json
application/rdf+xml
application/rss+xml
application/xhtml+xml
application/xml
font/eot
font/otf
font/ttf
image/svg+xml
text/css
text/javascript
text/plain
text/xml;
server {
listen *:80;
server_name blamegrief.ru www.blamegrief.ru;
return 301 https:/blamegrief.ru;
}
server {
location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}
server_name blamegrief.ru www.blamegrief.ru;
listen *:80;
listen 443 ssl;
server_name blamegrief.ru;
#ssl on;
ssl_certificate /etc/letsencrypt/live/blamegrief.ru/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/blamegrief.ru/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
}
Answer the question
In order to leave comments, you need to log in
The slash is missing
and listen *:80; remove it from the second server so that it does not try to process http traffic.
return 301 https:/blamegrief.ru;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question