Skip to content

Instantly share code, notes, and snippets.

@dopsmain
Created March 6, 2019 17:51
Show Gist options
  • Save dopsmain/e6120d53f1a913baa14b761d764499d0 to your computer and use it in GitHub Desktop.
Save dopsmain/e6120d53f1a913baa14b761d764499d0 to your computer and use it in GitHub Desktop.
server {
server_name <домен>;
root <абсолютный путь к директории с движком>;
index index.php;
location / {
root <абсолютный путь к директории с движком>;
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_ignore_client_abort on;
fastcgi_param SERVER_NAME $http_host;
}
access_log <Абсолютный путь к логу доступа>;
error_log <Абсолютный путь к логу ошибок>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment