Find the answer to your Linux question:
Results 1 to 6 of 6
Hello All, How to edit httpd.conf in Apache to forward all requests at Port 80 to Port 70 or any other ports? Krishna...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    25

    Thumbs up Port Forwarding in Apache


    Hello All,

    How to edit httpd.conf in Apache to forward all requests at Port 80 to Port 70 or any other ports?


    Krishna

  2. #2
    Linux User
    Join Date
    Dec 2009
    Posts
    262
    Quote Originally Posted by krishna. View Post
    Hello All,

    How to edit httpd.conf in Apache to forward all requests at Port 80 to Port 70 or any other ports?


    Krishna
    ?
    Why u wanna do that?
    Well anyway apache won't do it, you should check iptables if you wanna forward all traffic of port 80 to any different port.
    Maybe you are looking for: mod_proxy

  3. #3
    Just Joined!
    Join Date
    Sep 2009
    Posts
    25

    Thumbs up

    Dear Zomby,

    My 80 port is used by another service.

    I have made Apache to listen at port 70


    And i m running a website at wamp/www/website


    and i want website to be accessible by following link on other computers

    http://servername/website

    Rather than current url--- http://servername:70/website

    anything we can do using port other than 80 and still not mentioning the port number on url..


    Krishna

  4. #4
    Linux User
    Join Date
    Dec 2009
    Posts
    262
    Hi,

    there are several options available.
    1. simply use https (Port 443)
    Disadvantage needs more calculation power
    More complex to set up

    2. when you are useing a router:
    simply forward to port 70 instead of 80 to your computer

    3. Depending on your Service on Port 80
    Setup Virtual Hosts.
    That would be one apache running and depending on the name of the web-site you call you will be shown different content.
    Example:
    www.site1.local => 192.168.0.100
    www.site2.local => 192.168.0.100

    If you access www.site1.local you can show a different content than www.site2.local

    Same goes for proxy mode.

    If you put the service of port 80 to 81 you can use the apache proxy module to forward a sub-folder or name to the different service.

    May your service on port 80 supports a equal functionality.

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    IPTABLES is not what you are looking for in this case if you already have a web service running.
    I would say your best bet would be to follow zombykillah advice for virtual hosting.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #6
    Just Joined!
    Join Date
    Sep 2009
    Posts
    25

    Thumbs up

    Hi.

    my Apache is listening at port 70


    so i have to access localhost at as Open Source and Linux Forums



    i want localhost to be accessed as Open Source and Linux Forums instead of

    Open Source and Linux Forums



    Can i simply make some changes in httpd.conf to do that.


    KRISHNA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •