[#root@vm13 ~] vi /etc/nginx/conf.d/virtual.conf
server {
listen 80;
server_name ys-factory.example.com;
access_log /path/to/ys-factory.example.com/logs/access_log;
error_log /path/to/ys-factory.example.com/logs/error_log;
location / {
root /path/to/ys-factory.example.com/html;
index index.html index.htm index.php;
}
location /cgi-bin/ {
alias /home/webadmin/clients/ys-factory.example.com/cgi-bin;
}
location / {
fastcgi_pass 127.0.0.1:8080;
#fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param PATH_INFO /home/webadnin/clients/ys-factory.example.com/cgi-bin/*.cgi;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
}
"/etc/nginx/conf.d/virtual.conf" 26L, 632C written
[root@vm13 ~]# nginx -t
2009/12/18 15:41:09 [info] 16721#0: the configuration file /etc/nginx/nginx.conf syntax is ok
2009/12/18 15:41:09 [info] 16721#0: the configuration file /etc/nginx/nginx.conf was tested successfully
[root@vm13 ~]# service nginx restart