Author Topic: apache port  (Read 480 times)

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
apache port
« on: 20 August 2002, 10:28 »
can apache run on more then one port?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
apache port
« Reply #1 on: 20 August 2002, 10:30 »
cool... me and the guy in the database thread posted in the exact same minute. This should be on top!
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
apache port
« Reply #2 on: 20 August 2002, 10:41 »
quote:
Originally posted by Master of Reality / Bob:
can apache run on more then one port?


I could have swore you asked this before. At any rate, "Yes" is the answer.  Usually it is done by adding more "virtual servers". You can run the same host.domain on many ports, and you can run many host.domains on the same port, or you can run many host.domains on many ports.
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
apache port
« Reply #3 on: 20 August 2002, 10:43 »
a while ago i ask if it was possible to redirect to a certain port with a virtual host from fuckmicrosoft.com, but the webmaster told me that it wasnt beyond his capability.

So if i put more than one
Port 8000
it should run on both ports?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
apache port
« Reply #4 on: 20 August 2002, 10:50 »
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
apache port
« Reply #5 on: 20 August 2002, 10:53 »
so i will have to make another virtual host
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
apache port
« Reply #6 on: 20 August 2002, 10:57 »
Well yes, I thought that's what I said.  But if you aren't using virtual hosts (only one site hosted by your Apache) then you can have it listen on multiple ports by:

http://httpd.apache.org/docs/bind.html
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
apache port
« Reply #7 on: 20 August 2002, 10:59 »
but the virtual hosts dont effect what ports apache can listen on so wont i have to set 'Listen' to more then one port before i can set my virtual hosts to do it?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
apache port
« Reply #8 on: 20 August 2002, 11:08 »
Before you can use a port on a Virtual Host you must have a "Listen <portnum>" in the config:

Listen 80
Listen 443
Listen 8000
Listen 8800

etc.

Then you can do a:

NameVirtualHost chatroom.fuckmicrosoft.com
<VirtualHost chatroom.fuckmicrosoft.com:8000>
ServerName chatroom.fuckmicrosoft.com
DocumentRoot /var/www/chatroom
...
...
...
</VirtualHost>

<VirtualHost chatroom.fuckmicrosoft.com:8800>
ServerName chatroom.fuckmicrosoft.com
DocumentRoot /var/www/chatroom
...
...
...
</VirtualHost>

Well, at least that's the way I do it, but maybe there is an easier way...
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
apache port
« Reply #9 on: 20 August 2002, 11:23 »
should i comment out the 'Port' command?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
apache port
« Reply #10 on: 20 August 2002, 11:26 »
and i got this when restarting httpd:

[Mon Aug 19 14:46:36 2002] [error] VirtualHost 205.92.81.80:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Mon Aug 19 14:46:36 2002] [error] VirtualHost 205.92.81.80:8000 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

would this mean because i mixed priviledged ports and unpriviledged ports it might not work.

[ August 20, 2002: Message edited by: Master of Reality / Bob ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
apache port
« Reply #11 on: 20 August 2002, 13:13 »
Ok, I just did some playing and from a default RedHat 7.3 install all you should have to do is add:

Code: [Select]

It did not require a "NameVirtualHost" directive and you don't want the "Listen 80" as I indicated in the previous post. It pulled up the pages in the specified DocumentRoot on both port 8000 and 8800.

If you want two different DocumentRoot's, one for each port then you need two different <VirtualHost> directives. One IP:PORT each.

But I don't know "exactly" what you are trying to accomplish.  If you could spell out exactly what you want to do then I can give you a specific configuration.
e.g.
"I want to go to chatroom.fuckmicrosoft.com:8000 and get one web site and chatroom.fuckmicrosoft.com:8800 and get a different web site. I want them to log to separate log files. I want to be able to run CGI scripts in one.  I want to be able to use htaccess authentication on the other."

or

"I want to be able to go to chatroom.fuckmicrosoft.com:8000 and get one web site, myothersite.dyndns.org:8000 and get another web site on the same IP address. etc, etc."

[ August 20, 2002: Message edited by: VoidMain ]

Someone please remove this account. Thanks...