Can nginx hide port number and rewrites for virtualhost?

sdotsen nginx-forum at
Fri Apr 10 04:56:59 MSD 2009

I'm running Oracle Collab Suite on port 7777 and 7778. Oracle installed its own Apache and hacking it has proven to be difficult. For one thing, I can't seem to get VirtualHost to work correctly. Since it doesnt use port 80 by default, I decided to put nginx in front of it. I managed to proxy pass port 80 to 7778. However, it doesnt stop there. Here's how things are now.

My mail is pointed to the following URL:
My conferencing portal is pointed to:

As you can see, the URLs are pointed to mail because that's what the machine name is called. I managed to create a CNAME which works but once it redirects after you log in, it goes back to
So, two things ...

1 - How can I hide the port number, I think I got it to work using proxy_pass but that only seems to work for one "server."

  server {
    listen          80;
    location / {
      index index.html;

I added a second "server" directive for "" but it sends me in a loop.

2 - How can I rewrite my URL so that if I go to "" it doesn't change to "" Don't forget the app was installed and takes the hostname of the server which is

Posted at Nginx Forum:,944,944#msg-944

More information about the nginx mailing list