The element is positioned according to the normal flow of the document, and then offset relative to its nearest scrolling ancestor and containing block (nearest block-level ancestor), including table-related elements, based on the values of top, right, bottom, and left. The offset does not affect the position of any other elements.
If the position property is static, relative, or sticky, the containing block is formed by the edge of the content box of the nearest ancestor element that is either a block container (such as an inline-block, block, or list-item element) or establishes a formatting context (such as a table container, flex container, grid container, or the block container itself).
news-item.php?src=whatever
user_id
и по результату оконной функции rank()
с разделением по user_id
и сортировкой по id
, типа rank() OVER (PARTITION BY user_id ORDER BY id ASC)
, но для этого нужно использовать или CTE, или подзапросы во FROM (забыл как оно называется) enable-php-83.conf
server {
server_name back.example.com;
listen 443 ssl http2;
ssl_certificate /etc/ssl/domains/example.com/fullchain.pem;
ssl_certificate_key /etc/ssl/domains/example.com/privkey.pem;
access_log /srv/web/example.com/nginx.access.log main;
error_log /srv/web/example.com/nginx.error.log notice;
root /srv/web/example.com/back;
try_files $uri $uri/ @default;
index index.php index.html;
location @default {
#include addon.php@example.conf;
#include addon.php.conf;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param DOCUMENT_ROOT $document_root;
# не используем $fastcgi_script_name из-за проблем с alias
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param SCRIPT_NAME $uri;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param CONTENT_TYPE $content_type if_not_empty;
fastcgi_param CONTENT_LENGTH $content_length if_not_empty;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
#end include addon.php.conf;
fastcgi_pass unix:/srv/web/example.com/~run/php.socket;
#end include addon.php@example.conf;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
}
location ~ \.php$ {
include addon.php@example.conf;
try_files $uri @default;
}
}
server {
server_name back.example.com;
listen 80;
access_log /srv/web/example.com/nginx.access.log main;
error_log /srv/web/example.com/nginx.error.log notice;
return 308 https://$http_host$request_uri;
}
if
и rewrite
и пишите ОДНУ правильную директиву try_files $uri /index.php;
как указано в моём ответе