Error in proxying, multiple locations, multiple destinations
August 30, 2011 11:04AM
I have an Apache config which works perfectly, and tried to emulate it in nginx, however it only partially works. The first location /authenticate/ { } directive works fine, but the second location /cas/ { } directive times out, causing nginx to return an error to the browser. From the command line on the server I can manually retrieve with no difficulty, and as mentioned, the apache config works perfectly.

Apache Config:

Listen 5510
NameVirtualHost *:5510
<VirtualHost *:5510>
RewriteEngine on
RewriteRule ^/theme/(.+)$ /director2/theme/$1 [P]
RewriteRule ^/yui_2.7.0/(.+)$ /director2/yui_2.7.0/$1 [P]
RewriteRule ^/js/(.+)$ /director2/js/$1 [P]

ProxyPass /authenticate/
ProxyPassReverse /authenticate/

ProxyPass /cas/
ProxyPassReverse /cas/

ProxyPass /director2/
ProxyPassReverse /director2/

ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

SSLEngine on
SSLCertificateFile /etc/nginx/ssl/xxx.crt
SSLCertificateKeyFile /etc/nginx/ssl/xxx.key

<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [7-9]" ssl-unclean-shutdown

nginx config:

server {

listen 5510;
server_name localhost;

access_log /var/log/nginx/access.airfire-test.log;

ssl on;
ssl_certificate /etc/nginx/ssl/xxx.crt;
ssl_certificate_key /etc/nginx/ssl/xxx.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_prefer_server_ciphers on;

location / {
root /var/www;
index index.html;
location /authenticate/ {
location /cas/ {
location /director2/ {
location /theme/ {
location /yui_2.7.0/ {
location /js/ {

Any insight into any errors I might have in my nginx config would be greatly appreciated, or if there is a deeper problem in nginx that I can explore. Thanks!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
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