Skip to content

Instantly share code, notes, and snippets.

@nqthqn
Created June 1, 2018 21:09
Show Gist options
  • Save nqthqn/ac8fda550bfd52199325f100c7d32838 to your computer and use it in GitHub Desktop.
Save nqthqn/ac8fda550bfd52199325f100c7d32838 to your computer and use it in GitHub Desktop.
2 php servers
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8081;
server_name localhost;
location / {
root /Users/nnichols/bar;
index index.php;
location ~* \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
try_files $uri @yii =404;
}
}
}
server {
listen 8082;
server_name localhost;
location / {
root /Users/nnichols/foo;
index index.php;
location ~* \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
try_files $uri @yii =404;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment