Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

virtual hosts behind a firewall

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  505 error page  
Author Message
psissons

External


Since: Aug 06, 2003
Posts: 4



(Msg. 1) Posted: Thu Aug 07, 2003 12:54 am
Post subject: virtual hosts behind a firewall
Archived from groups: alt>apache>configuration (more info?)

I need help setting up Virtual Hosts. I have set up Red Hat Linux and
successfully configured Apache as a web server. I can hit the webserver
through the firewall however I am having difficulty getting Virtual
Hosts to work. I have read the documentation but something is not
clicking. I tried the following:
NameVirtualHost *
<VirtualHost *>
ServerName www.domain.tld
DocumentRoot /var/www/html/domain
</VirtualHost>
The ServerName directive is set to the external IP address. The computer
running Linux with the webserver is connected to a SMC router which is
running a firewall. Could this be causing me grief?

 >> Stay informed about: virtual hosts behind a firewall 
Back to top
Login to vote
admin34

External


Since: Jul 01, 2003
Posts: 47



(Msg. 2) Posted: Thu Aug 07, 2003 8:27 am
Post subject: Re: virtual hosts behind a firewall [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"paul sissons" <psissons.TakeThisOut@eudoramail.com> wrote in message
news:vj3jbirmkgtv87@corp.supernews.com...
 > I need help setting up Virtual Hosts. I have set up Red Hat Linux and
 > successfully configured Apache as a web server. I can hit the webserver
 > through the firewall however I am having difficulty getting Virtual
 > Hosts to work. I have read the documentation but something is not
 > clicking. I tried the following:
 > NameVirtualHost *
 > <VirtualHost *>
<font color=purple> > ServerName <a style='text-decoration: underline;' href="http://www.domain.tld</font" target="_blank">www.domain.tld</font</a>>
 > DocumentRoot /var/www/html/domain
 > </VirtualHost>
 > The ServerName directive is set to the external IP address. The computer
 > running Linux with the webserver is connected to a SMC router which is
 > running a firewall. Could this be causing me grief?

No,
You are using *

Your Virtual host setting should be as follows

NameVirtualHost my.ipa.ddr.ess
<VirtualHost <a style='text-decoration: underline;' href="http://www.domain.tld>" target="_blank">www.domain.tld></a>
ServerName <a style='text-decoration: underline;' href="http://www.domain.tld" target="_blank">www.domain.tld</a>
DocumentRoot /var/www/html/domain
</VirtualHost>

Mike.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: virtual hosts behind a firewall 
Back to top
Login to vote
psissons

External


Since: Aug 06, 2003
Posts: 4



(Msg. 3) Posted: Sat Aug 09, 2003 2:19 am
Post subject: Re: virtual hosts behind a firewall [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Michael Forster wrote:
 > "paul sissons" <psissons.TakeThisOut@eudoramail.com> wrote in message
 > news:vj3jbirmkgtv87@corp.supernews.com...
 >
  >>I need help setting up Virtual Hosts. I have set up Red Hat Linux and
  >>successfully configured Apache as a web server. I can hit the webserver
  >>through the firewall however I am having difficulty getting Virtual
  >>Hosts to work. I have read the documentation but something is not
  >>clicking. I tried the following:
  >>NameVirtualHost *
  >><VirtualHost *>
<font color=green>  >> ServerName <a style='text-decoration: underline;' href="http://www.domain.tld</font" target="_blank">www.domain.tld</font</a>>
  >> DocumentRoot /var/www/html/domain
  >></VirtualHost>
  >>The ServerName directive is set to the external IP address. The computer
  >>running Linux with the webserver is connected to a SMC router which is
  >>running a firewall. Could this be causing me grief?
 >
 >
 > No,
 > You are using *
 >
 > Your Virtual host setting should be as follows
 >
 > NameVirtualHost my.ipa.ddr.ess
<font color=purple> > <VirtualHost <a style='text-decoration: underline;' href="http://www.domain.tld></font" target="_blank">www.domain.tld></font</a>>
<font color=purple> > ServerName <a style='text-decoration: underline;' href="http://www.domain.tld</font" target="_blank">www.domain.tld</font</a>>
 > DocumentRoot /var/www/html/domain
 > </VirtualHost>
 >
 > Mike.
 >
 >
Thanx Mike. I tried this configuration but still no success. Let me
provide some more details about the set-up. With the default
configuration (no VirtualHost entries), DNS resolves successfully to the
router/firewall and is forwarded correctly to the computer running
RHL9 and Apache 2, and Apache displays the default Apache "Test Page"
(ie. located at /var/www/error/noindex.html).

My httpd.config file has the following settings:

#Main Server Configuration

Listen *:80

User apache
Group apache

# the internal server IP where the router/gateway is 192.168.2.1
ServerName 192.168.2.121
UseCanonicalName off
DocumentRoot "/var/www/html"

# Virtual Host Section
NameVirtualHost 192.168.2.121

<VirtualHost 192.168.2.121>
DocumentRoot /var/www/html/domainname
ServerName <a style='text-decoration: underline;' href="http://www.domainname.tld" target="_blank">www.domainname.tld</a>
</VirtualHost>

-- end of clip --

With this single VirtualHost Directive, Apache still redirects to the
Apache "Test Page" and not the "index.html" document in the 'domainname'
directory.

I have also placed an "index.html" document inside "/var/www" and
another inside "/var/www/html" but the server is not going to either of
these documents.

It is as though the domain name is getting stripped out by the firewall
and defaults to the Apache "Test Page"

I know it must be something real obvious, I just can't see it.

All suggestions appreciated.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: virtual hosts behind a firewall 
Back to top
Login to vote
admin34

External


Since: Jul 01, 2003
Posts: 47



(Msg. 4) Posted: Sat Aug 09, 2003 2:54 pm
Post subject: Re: virtual hosts behind a firewall [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"paul sissons" <psissons RemoveThis @eudoramail.com> wrote in message
news:weWYa.14388$%T.6069@edtnps84...
 > Michael Forster wrote:
  > > "paul sissons" <psissons RemoveThis @eudoramail.com> wrote in message
  > > news:vj3jbirmkgtv87@corp.supernews.com...
  > >
 > Thanx Mike. I tried this configuration but still no success. Let me
 > provide some more details about the set-up. With the default
 > configuration (no VirtualHost entries), DNS resolves successfully to the
 > router/firewall and is forwarded correctly to the computer running
 > RHL9 and Apache 2, and Apache displays the default Apache "Test Page"
 > (ie. located at /var/www/error/noindex.html).
 >
 > My httpd.config file has the following settings:
 >
 > #Main Server Configuration
 >
 > Listen *:80
Change to
Listen 192.168.2.121:80
 >
 > User apache
 > Group apache
 >
 > # the internal server IP where the router/gateway is 192.168.2.1
 > ServerName 192.168.2.121
What is this?
ServerName <a style='text-decoration: underline;' href="http://www.domainname.tld" target="_blank">www.domainname.tld</a>
 > UseCanonicalName off
 > DocumentRoot "/var/www/html"
 >
 > # Virtual Host Section
 > NameVirtualHost 192.168.2.121
 >
Change to
<VirtualHost <a style='text-decoration: underline;' href="http://www.domainname.tld:80>" target="_blank">www.domainname.tld:80></a>
 > DocumentRoot /var/www/html/domainname
<font color=purple> > ServerName <a style='text-decoration: underline;' href="http://www.domainname.tld</font" target="_blank">www.domainname.tld</font</a>>
 > </VirtualHost>
 >
 > -- end of clip --
 >
 > With this single VirtualHost Directive, Apache still redirects to the
 > Apache "Test Page" and not the "index.html" document in the 'domainname'
 > directory.
 >
How is the firewall working ? is it a hw firewall or is it Apache using
ProxyPass to send the requests through?

If the latter then you will not get it working unless you have it listen on
a different port for each Site.

Mike<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: virtual hosts behind a firewall 
Back to top
Login to vote
psissons

External


Since: Aug 06, 2003
Posts: 4



(Msg. 5) Posted: Sat Aug 09, 2003 9:25 pm
Post subject: Re: virtual hosts behind a firewall [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Michael Forster wrote:
 > "paul sissons" <psissons DeleteThis @eudoramail.com> wrote in message
 > news:weWYa.14388$%T.6069@edtnps84...
 >
  >>Michael Forster wrote:
  >>
   >>>"paul sissons" <psissons DeleteThis @eudoramail.com> wrote in message
   >>>news:vj3jbirmkgtv87@corp.supernews.com...
   >>>
  >>
  >>Thanx Mike. I tried this configuration but still no success. Let me
  >>provide some more details about the set-up. With the default
  >>configuration (no VirtualHost entries), DNS resolves successfully to the
  >> router/firewall and is forwarded correctly to the computer running
  >>RHL9 and Apache 2, and Apache displays the default Apache "Test Page"
  >>(ie. located at /var/www/error/noindex.html).
  >>
  >>My httpd.config file has the following settings:
  >>
  >>#Main Server Configuration
  >>
  >>Listen *:80
 >
 > Change to
 > Listen 192.168.2.121:80
 >
  >>User apache
  >>Group apache
  >>
  >> # the internal server IP where the router/gateway is 192.168.2.1
  >>ServerName 192.168.2.121
 >
 > What is this?

There is currently only one domain name pointing at this machine, so I
had read somewhere in the documentation about using the machine IP
instead for this setting. However, I switched it to the one domain
setting as you recommended.

<font color=purple> > ServerName <a style='text-decoration: underline;' href="http://www.domainname.tld</font" target="_blank">www.domainname.tld</font</a>>
 >
  >>UseCanonicalName off
  >>DocumentRoot "/var/www/html"
  >>
  >># Virtual Host Section
  >>NameVirtualHost 192.168.2.121
  >>
 >
 > Change to
<font color=purple> > <VirtualHost <a style='text-decoration: underline;' href="http://www.domainname.tld:80></font" target="_blank">www.domainname.tld:80></font</a>>
 >
  >> DocumentRoot /var/www/html/domainname
<font color=green>  >> ServerName <a style='text-decoration: underline;' href="http://www.domainname.tld</font" target="_blank">www.domainname.tld</font</a>>
  >></VirtualHost>
  >>
  >>-- end of clip --
  >>
  >>With this single VirtualHost Directive, Apache still redirects to the
  >>Apache "Test Page" and not the "index.html" document in the 'domainname'
  >>directory.
  >>
 >
 > How is the firewall working ? is it a hw firewall or is it Apache using
 > ProxyPass to send the requests through?

This is a hardware router(SMC Barricade 7004 VBR Cable/DSL Broadband
Router) that has built in firewall, forwarding, etc.

 > If the latter then you will not get it working unless you have it listen on
 > a different port for each Site.
 >
 > Mike

With the settings you recommend here, I no longer hit the Apache "Test
Page". This is progress!

However, it now hits the index page at the location set in the
'DocumentRoot' setting in the Main Server Configuration section, ie.
'/var/www/html' instead of '/var/www/html/domainname' as set in the
<VirtualHost> directive

Should 'UseCanonicalName' be set to 'on' or 'off' ?

Also the default httpd.conf file contains one 'Default Virtual Host'
container:
<VirtualHost *>
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
HostNameLookups off
</VirtualHost>
Should this be commented out or placed after the directive I have set up?

I may also try by-passing the firewall to see if eliminating it makes my
problems go away.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: virtual hosts behind a firewall 
Back to top
Login to vote
admin34

External


Since: Jul 01, 2003
Posts: 47



(Msg. 6) Posted: Sun Aug 10, 2003 3:53 am
Post subject: Re: virtual hosts behind a firewall [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"paul sissons" <psissons.RemoveThis@eudoramail.com> wrote in message
news:g0bZa.24231$%T.9165@edtnps84...

Ok, You need at least 2 Virtual Directory Settings. I have the following on
mine.

BindAddress 212.19.66.163
Port 80
<IfDefine SSL>
Listen 80
Listen 443
</IfDefine>
User wwwrun
Group nogroup
#First a catchall (ie one with no http 1.1 headers
#Used by forwarded domains as the forwarding process drops the 1.1 headers
<VirtualHost 212.19.66.163:80>
DocumentRoot /usr/local/httpd/htdocs/warpmymind/
ServerName www.warpmymind.co.uk
</VirtualHost>
#Now a domain
<VirtualHost host.dfsl.co.uk:80>
ServerName host.dfsl.co.uk
DocumentRoot /usr/local/httpd/htdocs/hosting
</VirtualHost>
#Now another one forwarded to another computer
<VirtualHost www.thequiltingsisters.com:80>
ServerName www.thequiltingsisters.com
ProxyPass / http://10.69.70.2:80/quilting/
ProxyPassReverse / http://10.69.70.2:80/quilting/
</VirtualHost>
 >> Stay informed about: virtual hosts behind a firewall 
Back to top
Login to vote
psissons

External


Since: Aug 06, 2003
Posts: 4



(Msg. 7) Posted: Mon Aug 11, 2003 11:29 pm
Post subject: Re: virtual hosts behind a firewall [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Michael Forster wrote:
 > "paul sissons" <psissons.DeleteThis@eudoramail.com> wrote in message
 > news:g0bZa.24231$%T.9165@edtnps84...
 >
 > Ok, You need at least 2 Virtual Directory Settings. I have the following on
 > mine.
 >
 > BindAddress 212.19.66.163
 > Port 80
 > <IfDefine SSL>
 > Listen 80
 > Listen 443
 > </IfDefine>
 > User wwwrun
 > Group nogroup
 > #First a catchall (ie one with no http 1.1 headers
 > #Used by forwarded domains as the forwarding process drops the 1.1 headers
 > <VirtualHost 212.19.66.163:80>
 > DocumentRoot /usr/local/httpd/htdocs/warpmymind/
<font color=purple> > ServerName <a style='text-decoration: underline;' href="http://www.warpmymind.co.uk</font" target="_blank">www.warpmymind.co.uk</font</a>>
 > </VirtualHost>
 > #Now a domain
 > <VirtualHost host.dfsl.co.uk:80>
 > ServerName host.dfsl.co.uk
 > DocumentRoot /usr/local/httpd/htdocs/hosting
 > </VirtualHost>
 > #Now another one forwarded to another computer
<font color=purple> > <VirtualHost <a style='text-decoration: underline;' href="http://www.thequiltingsisters.com:80></font" target="_blank">www.thequiltingsisters.com:80></font</a>>
<font color=purple> > ServerName <a style='text-decoration: underline;' href="http://www.thequiltingsisters.com</font" target="_blank">www.thequiltingsisters.com</font</a>>
<font color=purple> > ProxyPass / <a style='text-decoration: underline;' href="http://10.69.70.2:80/quilting/</font" target="_blank">http://10.69.70.2:80/quilting/</font</a>>
<font color=purple> > ProxyPassReverse / <a style='text-decoration: underline;' href="http://10.69.70.2:80/quilting/</font" target="_blank">http://10.69.70.2:80/quilting/</font</a>>
 > </VirtualHost>
 >

Mike,

That seemed to be a big part of my problem. Virtual Hosting is now
working. Thanx for all of your help.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: virtual hosts behind a firewall 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Virtual hosts and SSL? - Hello I'm trying to setup this apache 1.3 server for virtual hosts, with ssl. I've got the normal port 80 working, but the SSL is a bit of a mess. If I have the SSL pages in the real part of the server, ie, https://www.example.com/fred/index.htm then....

Virtual Hosts? - I'm wanting to use one IP address to host multiple domains, ie web hosting. I assume that "virtual hosts" are the thin I need to focus on here and is this basically a similar concept to Host Headers in IIS 5.0? I'm running Windows 2000 with Apa...

virtual hosts problem.. - hi, After Kerio + windows managed to delete my whole webserver, I've had to reinstall the lot.. However, I'm having a few problems with stuff... I have the virtual hosts working again, but cgi scripts are not working in all of them... I have WinXP +....

local virtual hosts - i've read many posts about this subject, but none have been exactly what i'm looking for. I have Apache 2.0.46 running Redhat 9. This PC along with 3 others are on a Dl-614+ router. I want to use the redhat machine as a development server for several....

Virtual Hosts :: logs - Hey all- I have apache 2.0.46 running the following virtual hosts, plus a few more: <VirtualHost *> ServerName www.awhc.org DocumentRoot "/home/awhc/www/" </VirtualHost> <VirtualHost *> ServerName awhc.org Doc...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]