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;
}
}
}
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,227843,227843#msg-227843
on 2012-06-25 10:03
on 2012-06-25 11:20
why you use two proxy modules? You should choose one. The port 8009 normally is the AJP connector, you should use it with ajp module. Or you can use the port 80 with http proxy module. Thanks. 2012/6/25 karolis <nginx-forum@nginx.us>:
on 2012-06-25 14:50
Ok, but that doesn't solve my problem. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,227843,227856#msg-227856
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.