Results 1 to 4 of 4

Thread: redirect port 80 to 8080 problem apache

  1. #1
    Just burned his ISO
    Join Date
    Jun 2010

    Default redirect port 80 to 8080 problem apache

    Hello everyone,

    I am using apache on backtrack.
    Everything worked fine, but when i want to redirect port 80 to 8080,
    I could not connect to my apache server anymore.
    I tried myipaddress:8080/index.html --> The requested URL /index.html was not found on this server.
    I also portforwarded port 8080.
    Here are the steps I took :

    /etc/apache2/ports.conf --> I changed the listen port to 8080 and also the Virtualhost to that port.

    PHP Code:
    # If you just change the port or add more ports here, you will likely also
    # have to change the VirtualHost statement in
    # /etc/apache2/sites-enabled/000-default

    NameVirtualHost *:80
    Listen 80

    <IfModule mod_ssl.c>
    # SSL name based virtual hosts are not yet supported, therefore no
        # NameVirtualHost statement here
    Listen 443
    After that I changed also the VirtualHost statement in /etc/apache2/sites-enabled/000
    to port 8080.

    PHP Code:
    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    Directory />
    Options FollowSymLinks
            AllowOverride None
    Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow
            allow from all

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    Directory "/usr/lib/cgi-bin">
    AllowOverride None
    +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow
            Allow from all

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
    LogLevel warn

    /var/log/apache2/access.log combined

    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny
            Deny from all
            Allow from
    / ::1/128


  2. #2
    Good friend of the forums espreto's Avatar
    Join Date
    Mar 2010

    Default Re: redirect port 80 to 8080 problem apache

    Will need to add a virtualhost for instance:

    <VirtualHost *:8080>
    DocumentRoot /var/www
    ErrorLog /var/log/apache2/error.log
    CustomLog /var/log/apache2/access.log combined
    Then edit ports.conf.
    NameVirtualHost *:8080
    Listen 8080
    Save, restart apache and see if it works!
    Take a look at:

    Documentation: Apache HTTP Server - The Apache HTTP Server Project

    Remember, make the appropriate changes to your case.

    (gdb) disass m(y_br)ain


  3. #3
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010

    Default Re: redirect port 80 to 8080 problem apache

    Uh errorman all the config you posted says port 80.... Did you do the forwarding at your router/FW? Is Apache configured to listen on 8080 aside from the config details in your OP?

    If your router/FW is doing the port forwarding i.e.: taking request for port 80 and remapping them to 8080 there still has to be a service on 8080 to reply.....
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  4. #4
    Super Moderator lupin's Avatar
    Join Date
    Jan 2010

    Default Re: redirect port 80 to 8080 problem apache

    You reloaded/restarted Apache after you changed those values to 8080 I assume? Did you do a netstat on your local BackTrack system to confirm that Apache was listening after the restart/reload, and did you do a ps to confirm that the Apache processes were running?
    Capitalisation is important. It's the difference between "Helping your brother Jack off a horse" and "Helping your brother jack off a horse".

    The Forum Rules, Forum FAQ and the BackTrack Wiki... learn them, love them, live them.

Similar Threads

  1. DNS spoofing to port 8080 instead of 80?
    By teaker in forum Beginners Forum
    Replies: 9
    Last Post: 12-09-2010, 08:55 AM
  2. Problem with Apache http server
    By Yoma! in forum Beginners Forum
    Replies: 4
    Last Post: 05-07-2010, 02:20 PM
  3. port scan to find systems without a certain port open?
    By humbleman in forum OLD Newbie Area
    Replies: 3
    Last Post: 07-30-2009, 04:14 PM
  4. Iptables redirect problem
    By compaq in forum OLD Newbie Area
    Replies: 1
    Last Post: 08-05-2008, 12:23 AM
  5. problem with port/ip forwarding
    By sorrow in forum OLD Newbie Area
    Replies: 0
    Last Post: 05-07-2008, 04:47 AM

Posting Permissions

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