Skip to content

Instantly share code, notes, and snippets.

@asaokamei
Last active August 29, 2015 14:17
Show Gist options
  • Save asaokamei/1ed73ab9779f51e7ee72 to your computer and use it in GitHub Desktop.
Save asaokamei/1ed73ab9779f51e7ee72 to your computer and use it in GitHub Desktop.
config for nginx/php.
apt-get install php5-fpm nginx php5-xdebug php5-dev
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
# another virtual host using mix of IP-, name-, and port-based configuration
#
server {
listen 8080;
server_name tuum.localhost;
#index index.php index.html index.htm;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
location / {
root /var/works/tuum/public;
try_files $uri /index.php?$args;
}
location ~ \.php$ {
root /var/works/tuum/public;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment