logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache Listen Command Not working
Author
miked06



Joined: 24 Jul 2007
Posts: 2
Location: VP, and Dev Team

PostPosted: Tue 24 Jul '07 21:38    Post subject: Apache Listen Command Not working Reply with quote

I have Apache and IIS setup on a Server 2003 machine, and Have 5 IP addresses on our connection. Apache serves up our main website and IIS serves up a control panel related to our business. The problem is that my section of httpd.conf that deals with the listen command seems to not be taking. Here is an example:

Listen 69.60.x.1:80
Listen 69.60.x.2:80

But Still apache listens on 0.0.0.0:80 (all five of our addresses)

Does anyone have any clue as to what I could be doing wrong? I have searched for about three days now looking for a fix. Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 25 Jul '07 9:12    Post subject: Reply with quote

You need to setup a vhost for each adress

e.g.
Code:

 NameVirtualHost 111.22.33.44
<VirtualHost 111.22.33.44>
# server A
...
</VirtualHost>

NameVirtualHost 111.22.33.55
<VirtualHost 111.22.33.55>
# server B
...
</VirtualHost>


View the manual for more details: vhosts

if there is still a question, please ask again.
Back to top
miked06



Joined: 24 Jul 2007
Posts: 2
Location: VP, and Dev Team

PostPosted: Wed 25 Jul '07 15:43    Post subject: Reply with quote

Just to make sure that I'm understanding you correctly here is what I want with the setup you described:

Apache httpd:
Listen 1.2.3.4:80 --> Our main website
Listen 1.2.3.5:80 --> Our business blog (don't ask)

IIS:
1.2.3.4.6:80 --> our control panel

then in Vhosts

NameVirtualHost 1.2.3.4:80
<VirtualHost 1.2.3.4:80>
#Main Website
</VirtualHost>

NameVirtualHost 1.2.3.5:
<VirtualHost 1.2.3.5:80>
#Website Blog
</VirtualHost>

Is that it? Thanks for the Reply James
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 25 Jul '07 15:56    Post subject: Reply with quote

Code:

 Listen 80

NameVirtualHost 1.2.3.4:80
<VirtualHost 1.2.3.4:80>
    ServerAdmin you@yourdomain.tld
    DocumentRoot C:/apache2/www
    ErrorLog C:/apache2/logs/error.log
    CustomLog C:/apache2/logs/access.log common
<Directory "C:/apache2/www">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>

NameVirtualHost 1.2.3.5:
<VirtualHost 1.2.3.5:80>
    ServerAdmin you@yourdomain.tld
    DocumentRoot C:/apache2/www_blog
    ErrorLog C:/apache2/logs/blog.error.log
    CustomLog C:/apache2/logs/blog.access.log common
<Directory "C:/apache2/www_blog">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
</VirtualHost>



For more info
http://httpd.apache.org/docs/2.2/en/vhosts/examples.html
Back to top


Reply to topic   Topic: Apache Listen Command Not working View previous topic :: View next topic
Post new topic   Forum Index -> Apache