LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-19-2011, 03:18 AM   #1
funny_sailor
LQ Newbie
 
Registered: Oct 2011
Posts: 7

Rep: Reputation: Disabled
Nginx "/" at the end of address


Hello!

I am configuring nginx(reverse proxy)

I have two services in local network :
server1/mail/ - RoundCube WebInterface IP:192.168.1.35
server2/bugzilla/ -Bugzilla WebInterface IP:192.168.1.60

when I go on local http://server1/mail all ok
when I go on http://domain.com/mail/ all ok too
but when I go on http://domain.com/mail and miss at the end "/",I see only text without picture and JS

with bugzilla situation like mail

nginx/site-availible/default :

Code:
server {
        listen   80 default;
        server_name  .domain.com;

        access_log  /var/log/nginx/localhost.access.log;

        location / {
                #root   /var/www/nginx-default;
                #index  index.html index.htm;
                proxy_pass        http://192.168.1.30:80;
                proxy_set_header  Host       $host;
                proxy_set_header  X-Real-IP  $remote_addr;
        }
location /bugzilla {
                rewrite ^(.*) https://domain.com/bugzilla/;
        }
location /mail {
                rewrite ^(.*) https://domain.com/mail/ ;
}
server {
listen   443;
server_name  localhost;
access_log  /var/log/nginx/ssl.access.log;
ssl on;
ssl_protocols  SSLv2 SSLv3 TLSv1;
ssl_certificate /etc/nginx/server.crt;
ssl_certificate_key /etc/nginx/server.key;

 location / {
                #root   /var/www/nginx-default;
                #index  index.html index.htm;
                proxy_pass        http://192.168.1.30:80;
                proxy_set_header  Host       $host;
                proxy_set_header  X-Real-IP  $remote_addr;
        }

 location /bugzilla {
                #root   /var/www/nginx-default;
                #index  index.html index.htm;
                proxy_pass        https://192.168.1.60:443/bugzilla/;
                proxy_redirect    off;
                #proxy_redirect   https://server2:443 https://domain.com:443;
                proxy_set_header  Host       $host;
                proxy_set_header  X-Real-IP  $remote_addr;
                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                proxy_set_header Accept-Encoding "";

                proxy_hide_header Vary;
                gzip on;
                gzip_vary on;
                gzip_proxied any;
                gzip_http_version 1.0;

                sub_filter        'server2' 'domain.com';
                sub_filter_once   off;

        }


 location /mail {
                proxy_pass        https://192.168.1.35:443/mail/;
                proxy_redirect    off;
                proxy_set_header  Host       $host;
                proxy_set_header  X-Real-IP  $remote_addr;
                sub_filter_once   on;
        }

}
I don't know how add autoredirect from domain.com/mail to domain.com/mail/


P.S. Sorry for my English
 
Old 10-19-2011, 05:16 AM   #2
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
Here's a discussion about something similar:
http://forum.slicehost.com/comments....cussionID=3394

I hope this helps
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Key Bindings for "Home" and "End" Mr. Alex Arch 3 01-25-2011 10:19 AM
Occasionally-- "connected with self-assigned address," "deactivating device eth0" MaxIBoy Debian 4 10-04-2009 10:50 AM
A single regex to match anything with ".aac" or ".mp3" at the end ? lumix Linux - General 9 05-09-2008 01:11 AM
fdisk reports odd "Start "and "End" sectors on single partition eponymous Linux - Software 3 10-01-2007 03:41 PM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 01:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration