Skip to content

Instantly share code, notes, and snippets.

@bendo01
Created April 19, 2012 15:29
Show Gist options
  • Select an option

  • Save bendo01/2421733 to your computer and use it in GitHub Desktop.

Select an option

Save bendo01/2421733 to your computer and use it in GitHub Desktop.
nginx and jenkins
#user nobody;
worker_processes 4;
worker_rlimit_nofile 8192;
worker_priority 0;
events {
multi_accept off;
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#access_log /opt/local/logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 3600;
gzip on;
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /opt/local/www;
access_log /opt/local/var/log/nginx/access.log;
error_log /opt/local/var/log/nginx/error.log;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
# server_name_in_redirect off;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://127.0.0.1:8080;
break;
}
}
location /phpmyadmin {
root /opt/local/www/;
}
location /phppgadmin {
root /opt/local/www/;
}
include ikemekApp.conf;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
#root /var/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment