Results 1 to 2 of 2

Thread: Apache site on a specific port

  1. #1
    Join Date
    Aug 2007
    Beans
    25

    Question Apache site on a specific port

    I want one of my sites in /etc/apache2/sites-available to listen on a specific port. So browsing to http://myserver/trac should not be possible. But https://myserver/trac should work.

    The site i want to add is my projects Trac site. The port is HTTPS(443).

    I already tried:
    • <Location /trac:443>
    • Encapsulate <Location> with <VirtualHost>
    • Google

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Beans
    396
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Apache site on a specific port

    first thing is 443 - thats the SSL/https port, running a website on that is not a good call in my opinion, unless you want to use https, in which case setup https.

    The other thing is the virtual host tag should be all you need.

    eg: if your using name based virtual hosts all you need to do is

    <VirtualHost *:123>
    blah
    </VirtualHost>

    This will tell apache to listen on all IP's on your system, on port 123 for the site defined in ServerName

    you can narrow it down to

    <VirtualHost 127.0.0.1:123>
    blah
    </VirtualHost>

    which will only listen on 127.0.0.1(localhost) on port 123 for the site defined in ServerName

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
  •