vi /apps/nginx/conf/conf.d/test.conf
charset utf-8;
server_tokens off;
server {
listen 80;
server_name www.x.com;
location / {
root /data/php/wordpress;
index index.php index.html index.htm;
}
location ~* \.php$ {
root /data/php/wordpress;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 80;
server_name admin.x.com;
location / {
root /data/php/wordpress;
index wp-login.php index.php;
}
location ~* \.php$ {
root /data/php/wordpress;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}