Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- root /var/www/html;
- # Add index.php to the list if you are using PHP
- index index.php index.html index.htm index.nginx-debian.html;
- server_name somename.ru www.somename.ru;
- charset utf-8;
- location ~ \.(html|png|gif|jpg|woff|ttf|svg|ico|map|json|docx|log)$ {
- root /var/www/html/img;
- expires 1h;
- }
- location ~* ^.+\.(js|json)$ {
- root /var/www/html/js;
- expires 1h;
- }
- location ~* ^.+\.(css|saas|sass)$ {
- alias /var/www/html/css;
- expires 1h;
- }
- location / {
- try_files $uri /index.php$is_args$args;
- }
- location ~ ^/index\.php(/|$) {
- fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
- fastcgi_param DOCUMENT_ROOT $realpath_root;
- internal;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement