Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #user nobody;
- worker_processes 2;
- #error_log logs/error.log;
- #error_log logs/error.log notice;
- #error_log logs/error.log info;
- #pid logs/nginx.pid;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- # '$status $body_bytes_sent "$http_referer" '
- # '"$http_user_agent" "$http_x_forwarded_for"';
- #access_log logs/access.log main;
- sendfile on;
- tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 65;
- #gzip on;
- server {
- #gzip on;
- listen 80;
- server_name localhost;
- location ~ ^/cgi-bin/.*\.(cgi|pl|py|rb) {
- gzip off;
- fastcgi_pass 127.0.0.1:49232;
- fastcgi_index cgi-bin.php;
- fastcgi_param SCRIPT_FILENAME /usr/local/nginx/conf/cgi-bin.php;
- fastcgi_param SCRIPT_NAME /cgi-bin/cgi-bin.php;
- fastcgi_param X_SCRIPT_FILENAME /var/www$fastcgi_script_name;
- fastcgi_param X_SCRIPT_NAME $fastcgi_script_name;
- fastcgi_param QUERY_STRING $query_string;
- fastcgi_param REQUEST_METHOD $request_method;
- fastcgi_param CONTENT_TYPE $content_type;
- fastcgi_param CONTENT_LENGTH $content_length;
- fastcgi_param GATEWAY_INTERFACE CGI/1.1;
- fastcgi_param SERVER_SOFTWARE nginx;
- fastcgi_param REQUEST_URI $request_uri;
- fastcgi_param DOCUMENT_URI $document_uri;
- fastcgi_param DOCUMENT_ROOT $document_root;
- fastcgi_param SERVER_PROTOCOL $server_protocol;
- fastcgi_param REMOTE_ADDR $remote_addr;
- fastcgi_param REMOTE_PORT $remote_port;
- fastcgi_param SERVER_ADDR $server_addr;
- fastcgi_param SERVER_PORT $server_port;
- fastcgi_param SERVER_NAME $server_name;
- fastcgi_param REMOTE_USER $remote_user;
- }
- location ~ ^/awstats/ {
- root /var/www/awstats;
- index index.html;
- access_log off;
- error_log off;
- charset utf-8;
- }
- location ~ ^/icon/ {
- root /root/awstats/wwwroot;
- index index.html;
- access_log off;
- error_log off;
- charset utf-8;
- }
- location / {
- root /var/www;
- index index.html index.htm index.php;
- }
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement