Hiding my port(8080) from user

Dear Experts,

My Internet Service Provider(ISP) has blocked the port 80, and I have registered a domain, say abcabc.com.
It works fine for my server setting.

when user type www.abcabc.com, I set it redirect to abcabc.com:8080

In the "Domain Name Maintenance" of my Domain Name Provider:
Record Type
A/CNAME(Alias)/MXE/MX/URL Redirect/URL Frame

I currently set to
Hostname      Address                  Record Type
www            abcabc.com:8080            URL Redirect
*            xxx.no-ip.com            CNAME(Alias)

When I type www.abcabc.com, it will redirect to xxx.no-ip.com:8080 which is my machine.

I have a server, running apache2 using 8080; when I list out a directory from a browser, all the hyper links there would be displayed as:
/test.html       -> http://abcabc.com:8080/test.html
/abc.html      -> http://abcabc.com:8080/abc.html

is it possible to set something to make the hyper links in apache
/test.html       -> http://www.abcabc.com/test.html
/abc.html      -> http://www.abcabc.com/abc.html

I think there is something to set in the Virtual Host in apache and in my domain name provider, as I remember I has made it works "accidently".
Thanks for your help!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

secret_boyAuthor Commented:
In addition,

I have set my apache start using user "apache" instead of "root" with port 8089.
My router will route all traffic from 8080 to 8089 of my machine.

Pls tell me if u want more information.
Thanks in advance!
secret_boyAuthor Commented:
I guest setting "UseCanonicalName On" in httpd.conf may work, but tried..................
no luck.

No because the outside world has to direct which port to use since port 80 is blocked by your ISP and your using port 8080.  To get the system's to recongize this http://www.abcabc.com/test.html port 80 has to be enabled but as you stated before its blocked by the ISP.  What you can do is "Cloak" your domain name so the user only see's www.abcabc.com in the address bar at all times even when directed to another page.

So the main issue here is with this url "http://www.abcabc.com/test.html" the client is going to try to access the web server on port 80.  But unfortunetly port 80 is blocked so the session will hang.  

The url has to be directed like this http://www.abcabc.com:8080/test.html to tell the client to use port 8080 to access the web server on port 8080.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

secret_boyAuthor Commented:
Thanks Stanley,
yes, I know what u mean.

but if I type http://www.abcabc.com/test.html manually in the browser, it can be redirected to http://abcabc.com:8080/test.html.

All I want to do is to display the link as I said.
I do think that there is just some setting tricks in Apache like "UseCanonicalName On"

It is not possible, because the standard HTTP port is 80, and your server is using a non-standard port, so the URL will contain the port information.

A workaround is to get a webserver outsite your ISP to host for the domain name www.abcabc.com, and redirect the page to your webserver. You can use frames to hide the URL.

secret_boyAuthor Commented:
Yes, that's network level problem. And I don't like the "URL Frame" method as it does nothing on my apache file listing.

Let me explain more explicitly what I want:
all pages requesting www.abcabc.com/test.html is redirected to http://abcabc.com:8080/test.html

that's unsolvable if I don't ask the ISP to open the port.

But my question here is at the application level: the setting in Apache.
when do the listing in the browseable /share directory,
the links are automatically listed as

is there any setting in Apache, to list files in /share as

I know all transmission must pass through port 8080, but is there any method to make apache to "generate" www.abcabc.com instead of abcabc.com:8080?

You should be able to just use a mod_rewrite rule

Something like:

RewriteEngine on
RewriteRule   ^/(.*)    http://abcabc.com:8080/$1

(don't quote me that that's exactly right, I haven't had enough coffee yet)

The Apache rewrite guides should help though:

httpd 2.0
If you take out the 8080 the website will NOT be able to be accessed.  Because the client is going to be searching on the wrong port.  What service are you using for your dns and web forwarding?
secret_boyAuthor Commented:
Thanks christsis.

U get what I mean.
I need to recompile my apache to add this module.

Tell you once when I am able to, thanks.
secret_boyAuthor Commented:
I have tried.
oh.......document rewrite seems not work for my case.

For example:
If I write a rule:
abcabc.com:8080 rewrite to www.abcabc.com

When I type in the browser.
abcabc.com:8080 -> www.abcabc.com -> abcabc.com:8080 -> www.abcabc.com -> loop many times.................

is there any other method?
Man I wish I had a test box laying around to try stuff before I spout more stuff off... :)

I think this actually requires a combination of mod_proxy and mod_rewrite. I just don't have a box to test it's reaction to make sure I'm giving you a good config... But should it work it'd be something like:

ProxyRequests Off
RewriteEngine On
ProxyPass / http://www.abcabc.com:8080
RewriteRule ^/(.*) http://www.abcabc.com:8080/$1 [P,L]
ProxyPassReverse / http://www.abcabc.com:8080/

secret_boyAuthor Commented:
it doesn't work for me.............is there any other method?
Wait a minute... that was stupid of me. We did that backwards before. We needed to rewrite apache to the standard port not the hidden one. I told you I didn't have enough coffee that morning.

RewriteEngine on
RewriteRule   ^/(.*)    http://abcabc.com:8080/$1

Should be:

RewriteEngine on
RewriteRule   ^/(.*)    http://abcabc.com/$1

I'm no good with regular expressions but that's going to be the right way to go about this.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept - christsis

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.