Skip to content

Instantly share code, notes, and snippets.

@Zork67
Created July 27, 2015 13:04
Show Gist options
  • Save Zork67/73d93a97caf455a39915 to your computer and use it in GitHub Desktop.
Save Zork67/73d93a97caf455a39915 to your computer and use it in GitHub Desktop.
site conf nginx
# site
server {
listen 80;
server_name site.com www.site.com;
root /home/webserver/var/www/html/site/app;
index index.php index.html index.htm;
charset utf-8;
#access_log //home/webserver/var/www/html/site/logs/host.access.log main;
client_max_body_size 75M;
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ .php$ {
root /home/webserver/var/www/html/site/app;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/webserver/var/www/html/site/app$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment