Skip to content

Instantly share code, notes, and snippets.

@LivesInSpb
Last active January 24, 2018 14:52
Show Gist options
  • Save LivesInSpb/2cbc9e121451b4b562109fa5a3401650 to your computer and use it in GitHub Desktop.
Save LivesInSpb/2cbc9e121451b4b562109fa5a3401650 to your computer and use it in GitHub Desktop.
nginx.conf
server
{
listen *:80;
server_name .domain;
charset utf8;
root /home/livesinspb/httpdocs/domains/domain;
access_log /home/livesinspb/httpdocs/logs_all/domain.access.log ;
error_log /home/livesinspb/httpdocs/logs_all/domain.error.log debug;
location / {
index index.php;
if (!-e $request_filename)
{
rewrite ^(.*)$ /index.php ;
}
set $env "SOMEVALUE";
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_ADMIN root@domain;
fastcgi_param DEV $env;
fastcgi_index index.php;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment