0% found this document useful (0 votes)
124 views5 pages

Nginx Conf Gandalf

This document contains the configuration settings for the nginx web server. It defines settings for logging, caching, compression and passing requests to FastCGI servers. It also sets up server blocks for three domains: hipodromo.com.mx, oaktreeracing.com and santaanita.com. The configuration routes requests for PHP files to FastCGI servers listening on ports 9001, 9000 and 9002 respectively.

Uploaded by

fndtn357
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
124 views5 pages

Nginx Conf Gandalf

This document contains the configuration settings for the nginx web server. It defines settings for logging, caching, compression and passing requests to FastCGI servers. It also sets up server blocks for three domains: hipodromo.com.mx, oaktreeracing.com and santaanita.com. The configuration routes requests for PHP files to FastCGI servers listening on ports 9001, 9000 and 9002 respectively.

Uploaded by

fndtn357
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.

pid;

events { worker_connections 2048; }

http { include mime.types; default_type application/octet-stream; proxy_next_upstream off; 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 5; gzip on; gzip_http_version 1.0; gzip_comp_level 2; gzip_min_length 1100; gzip_buffers 16 8k; gzip_proxied any; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-excel; server { listen 80;

server_name hipodromo.dgrp.com hipodromo.com.mx *.hipodromo.com.mx; location / { root /usr/home/hipo/webdocs; index index.php; if (-f $request_filename) { break; } if ($request_uri = /favicon.ico) { break; } if (!-f $request_filename) { rewrite ^/(.*)$ /index.php?q=$1 last; } } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9001 # location ~ \.php$ { root /usr/home/hipo/webdocs; fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/home/hipo/webdocs$fastcgi_script_name; include /usr/local/etc/nginx/fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } } server { listen 80; server_name www.oaktreeracing.com oaktreeracing.com *.oaktreeracing.com oaktreeracing.vpop.net; #access_log logs/host.access.log main; root /usr/home/oaktree/webdocs; index index.php;

location /sites/all/modules/ad/serve.php { return 404; } location / { try_files $uri @cache; } location @cache { if ( $request_method !~ GET ) { rewrite ^/(.*)$ /index.php?q=$1 last; } if ($http_cookie ~ "DRUPAL_UID") { rewrite ^/(.*)$ /index.php?q=$1 last; } try_files /cache/$server_name${uri}_$args.html @drupal; } location @drupal { rewrite ^/(.*)$ /index.php?q=$1 last; } #============ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { try_files $uri @drupal; # root /usr/home/oaktree/webdocs; access_log /var/log/nginx-drupal.log; access_log /var/log/nginx-access.log; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/home/oaktree/webdocs$fastcgi_script_name; include /usr/local/etc/nginx/fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } } # oaktreeracing:80

server { listen 80; server_name www.santaanita.com santaanita.com *.santaanita.com; #access_log logs/host.access.log main; root /usr/home/santaanita/webdocs; index index.php; location /sites/all/modules/ad/serve.php { return 404; } location / { try_files $uri @cache; } location @cache { if ( $request_method !~ GET ) { rewrite ^/(.*)$ /index.php?q=$1 last; } if ($http_cookie ~ "DRUPAL_UID") { rewrite ^/(.*)$ /index.php?q=$1 last; } try_files /cache/$server_name${uri}_$args.html @drupal; } location @drupal { rewrite ^/(.*)$ /index.php?q=$1 last; } #============ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9002 # location ~ \.php$ { try_files $uri @drupal; # root /usr/home/santaanita/webdocs; access_log /var/log/nginx-drupal.log; access_log /var/log/nginx-access.log; fastcgi_pass 127.0.0.1:9002; fastcgi_index index.php; fastcgi_read_timeout 120; fastcgi_param SCRIPT_FILENAME /usr/home/santaanita/webdocs$fastcgi_script_name; include /usr/local/etc/nginx/fastcgi_params;

} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; }

} # santaanita:80 } # http

You might also like