Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to make my server to use a different port

  1. #1
    Join Date
    Aug 2013
    Beans
    9

    How to make my server to use a different port

    Hi I would like my server to use port 80 instead of port 22, can some one please let me know how to do this.
    I'm using Ubuntu server 12.04.2 LTS

  2. #2
    Join Date
    Sep 2006
    Beans
    8,367
    Distro
    Ubuntu 14.04 Trusty Tahr

    ssh?

    Which server? I am going to guess that you mean your SSH server. If that is the case look in /etc/ssh/sshd_config and look for Port or ListenAddress. Before changing anything take at least a quick look in the manual page for sshd_config and look up those two directives. Be sure to keep a backup copy of the original file, just in case.

    Changing the port won't actually do much for you. You'll get a better increase in scurity there by disabling password authentication and using keys instead.

    Or did you mean another server?

  3. #3
    Join Date
    Aug 2013
    Beans
    9

    Re: How to make my server to use a different port

    I'm trying to make a web server and I'm trying to access it over the internet and I need port 80 to do that. I will do as you suggested and then I will let you know if I was successful or not. If you have any other information for me I would really appreciate it.

  4. #4
    Join Date
    Sep 2006
    Beans
    8,367
    Distro
    Ubuntu 14.04 Trusty Tahr

    web server

    For a web server, you would need nginx or Apache2. Both of those would be managed by logging in via ssh on port 22, but the web servers themselves would be serving web pages over port 80 (http) and port 443 (https). Which do you have nginx or Apache2?

  5. #5
    Join Date
    Aug 2013
    Beans
    9

    Re: How to make my server to use a different port

    I have apache2

  6. #6
    Join Date
    Sep 2006
    Beans
    8,367
    Distro
    Ubuntu 14.04 Trusty Tahr

    apache2

    Apache2 will listen by default on port 80 for unencrypted connections. Best to leave it that way and leave ssh on port 22. A place for everything and everything in its place.

    The configurations for your default virtual host will be in /etc/apache2/sites-available/000-default.conf

    If you want to set up encrypted web service (https) that will listen on port 443, but you will have to set up a certificate.

  7. #7
    Join Date
    Aug 2013
    Beans
    9

    Re: How to make my server to use a different port

    If it's best that I leave it alone then how do I get my sites to be viewable on the internet, I had DMZ configured on my router but it didn't work.

  8. #8
    Join Date
    Sep 2006
    Beans
    8,367
    Distro
    Ubuntu 14.04 Trusty Tahr

    port forwarding

    To get your web sites visible on the Internet at large, you need to have your router forward ports 80 and 443 to the appropriate machine on your LAN. The exact details vary from router to router. What kind of router do you have?

  9. #9
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How to make my server to use a different port

    Moved to server platforms.

  10. #10
    Join Date
    Aug 2013
    Beans
    9

    Re: How to make my server to use a different port

    The router I have is a telkom mega-105 wr

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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