Welcome! Log In Create A New Profile

Advanced

AJP from apache to nginx

June 25, 2012 04:03AM
Hi everyone,

first of all i'm completely new user of nginx. I want to move from apache-tomcat to nginx-tomcat, but i'm having big problems with nginx ajp module and how to use it. Any help would be greatly appreciated!

Here are my apache httpd-vhosts.conf:

NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName alis.am.lt
ProxyRequests off
ProxyPreserveHost on

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /AlisL09Service http://10.255.6.120:8080/AlisL09Service/
ProxyPassReverse /AlisL09Service http://10.255.6.120:8080/AlisL09Service/

ProxyPass /gis/geoserver/web !
ProxyPass /gis http://10.255.5.140:8080
ProxyPassReverse /gis http://10.255.5.140:8080

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ProxyPassReverse / http://localhost:8009/
ProxyPassReverseCookiePath /localhost /localhost/

</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName alis.am.lt

ProxyRequests off
ProxyPreserveHost on

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /gis/geoserver/web !
ProxyPass /gis http://10.255.5.140:8080
ProxyPassReverse /gis http://10.255.5.140:8080

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ProxyPassReverse / http://localhost:8009/
ProxyPassReverseCookiePath /localhost /localhost/

SSLEngine on
SSLProtocol all
SSLCertificateFile /home/dts/certificates/alis.publicsite.primary.cert.p7b
SSLCertificateKeyFile /home/dts/certificates/alis.am.lt_privateKeyNoPass.key
SSLCertificateChainFile /home/dts/certificates/alis.publicsite.intermediate.cert.p7b

</VirtualHost>
SSLPassPhraseDialog builtin


And here's what i have so far in my nginx.conf:

user nginx;
worker_processes 8;

error_log logs/error.log;
pid logs/nginx.pid;

events {
worker_connections 8192;
}

http {
upstream www_serveriai {
server 10.255.7.120:443;
}
upstream www_serveriai_80 {
server 10.255.7.120:80;
}
include /usr/local/nginx/conf/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 /usr/local/nginx/logs/access.log main;

sendfile on;
keepalive_timeout 65;

server {
listen 80;
server_name alis.am.lt;
location / {
#proxy_pass ajp://localhost:8009/;
proxy_pass http://localhost:8009/;
ajp_keep_conn on;
ajp_pass www_serveriai_80;
}

}
}
Subject Author Posted

AJP from apache to nginx

karolis June 25, 2012 04:03AM

Re: AJP from apache to nginx

姚伟斌 June 25, 2012 05:22AM

Re: AJP from apache to nginx

karolis June 25, 2012 08:49AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready