server {
listen 80;
access_log /home/example/logs/nginx.access.log;
server_name api.example.net;
location /api1 {
root /home/example/api/api1;
}
location ~ \.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;
}
}