Solved

redirect port 8080 to 80

Posted on 2004-10-19
8
985 Views
Last Modified: 2010-03-04
I'd like to make Apache listen on ports 80 and 8080. The same content is to be served on both ports. I'm using Fedora Core 2. I tried setting up a virtual host but I'm getting Unable to connect to remote host. Can't access startfile http://localhost:8080/
0
Comment
Question by:fabiovh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 19

Expert Comment

by:ramazanyich
ID: 12347555
Add directive in main part of httpd.conf:
Listen *:8080
0
 
LVL 19

Accepted Solution

by:
ramazanyich earned 100 total points
ID: 12347562
or just
Listen 8080
0
 

Author Comment

by:fabiovh
ID: 12348556
thanks, but now it's only locally accessible, if i try http://192.168.1.2:8080 it says the page cannot be displayed.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 19

Expert Comment

by:ramazanyich
ID: 12350541
How your VirtualHost directives looks like ?
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 12350560
Just try following
<VirtualHost 192.168.1.2:8080>
ServerAdmin your@email.address
DocumentRoot /your/document/root
ServerName 192.168.1.2
ErrorLog logs/error_log
TransferLog logs/access_log
</VirtualHost>
0
 

Author Comment

by:fabiovh
ID: 12351924
thanks ramazanyich, but it has to do with the firewall, if I "service iptables stop" it works.
0
 
LVL 5

Assisted Solution

by:mrielf
mrielf earned 25 total points
ID: 12366255
iptables -t nat -A PREROUTING -p tcp --dport 8080 -j REDIRECT --to-port 80
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 12366801
but without sugested Directive Apache will not listen on port 8080.
I think I deserved ny points :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question