Welcome! Log In Create A New Profile

Advanced

ISPConfig and reverse proxy with Nginx

Posted by ideanet 
ISPConfig and reverse proxy with Nginx
July 20, 2010 04:02AM
Hi, have some problem to configure the reverse proxy with nginx on an ISPConfig installation.
I have installed Nginx 6.39 (yum package on CentOS).

on httpd.conf have configured that apache listen on port 82.

[code]
Listen 82
[/code]


my nginx.conf

[code]
user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log;

pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/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 /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-available/*;

}

[/code]

my /etc/nginx/sites-available/default

[code]
server {
listen 80 default;
server_name _;
server_name_in_redirect off;
resolver 127.0.0.1;
#### www. redirect - all domains starting with www will be redirected to http://domain. ####
if ($host ~* ^(www\.)(.+)) {
set $rawdomain $2;
rewrite ^/(.*)$ http://$rawdomain/$1 permanent;
}
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|flv|html|htm|mp3)$ {
root /var/www/$host/web;
access_log off;
expires 30d;
}
location / {
root /var/www/$host/web;
index index.html index.htm index.php;
access_log off;
proxy_pass http://$host:82;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

[/code]

but when I start apache and nginx, on /var/log/nginx/error.log I found the following error
[code]
panic: MUTEX_LOCK (22) [op.c:352].

[/code]

When I start nginx with the "-t" option, the test is ok.
Anyone have an idea what is the problem ?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 153
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready