Web Server with FreeBSD, Help me !

Web Server with FreeBSD, Help me !

Post by Marc Dieric » Sun, 11 Aug 2002 22:48:20



Hello,

I have just started using FreeBSD 4.5. I use Apache Server 2.0.39
configurated with virtual host.
Before I use to function on Windows and everything was ok without DNS.
So since I change to FreeBSD platform, my virtuals hosts don't function
anymore and I don't know why !
How do I make my v.h function ??
I tried several things from the newsgroups advices without success.
My research were in /etc/hosts.* and I didn't understand what to do.
I have a LAN connection and my IP address seldom changes (about every 6
months). I utilize the dyndns.org services.
The principal name server and name of my computer are as :
principal.dyndns.org
The users (vh) are named : user1.dyndns.org, user2.dyndns.org, and
more...
I have been researching everywhere I know without success, I need
SERIOUS HELP.

Thanks
Marc Dierick

 
 
 

Web Server with FreeBSD, Help me !

Post by Matt Rickar » Mon, 12 Aug 2002 01:34:00


Quote:> Hello,

> I have just started using FreeBSD 4.5. I use Apache Server 2.0.39
> configurated with virtual host.
> Before I use to function on Windows and everything was ok without DNS.
> So since I change to FreeBSD platform, my virtuals hosts don't function
> anymore and I don't know why !
> How do I make my v.h function ??
> I tried several things from the newsgroups advices without success.
> My research were in /etc/hosts.* and I didn't understand what to do.
> I have a LAN connection and my IP address seldom changes (about every 6
> months). I utilize the dyndns.org services.
> The principal name server and name of my computer are as :
> principal.dyndns.org
> The users (vh) are named : user1.dyndns.org, user2.dyndns.org, and
> more...

Do virtual hosts function properly from outside the internal network?  I ran
into this same problem when I put my OpenBSD router/firewall in place.  You
can't NAT out of the network and then back in again.  From anywhere on the
internet the virtual hosts worked fine, but from inside the network (behind
NAT) they didn't.  My solution was to add the necessary virtual hosts to my
/etc/hosts file, and now they work both internal and external.

Not sure if this is your problem, but if you need any more help just post
some more details.

-Matt

 
 
 

Web Server with FreeBSD, Help me !

Post by David Magd » Mon, 12 Aug 2002 01:38:50



> Hello,

> I have just started using FreeBSD 4.5. I use Apache Server 2.0.39
> configurated with virtual host.
> Before I use to function on Windows and everything was ok without DNS.
> So since I change to FreeBSD platform, my virtuals hosts don't function
> anymore and I don't know why !
> How do I make my v.h function ??

[...]

First of all it would be helpfull you you posted any error messages
that you received. Usually when you start up Apache via the startup
script, or apachectl. Check the logs as well.

Second, how can anyone help if you don't post your configuration?
Would you mind posting the segments of your httpd.conf that have
"NameVirtualHost" and the <VirtualHost ??>[...]</VirtualHost>
defined.

--
David Magda <dmagda at ee.ryerson.ca>
Because the innovator has for enemies all those who have done well under
the old conditions, and lukewarm defenders in those who may do well
under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI

 
 
 

Web Server with FreeBSD, Help me !

Post by Marc Dieric » Mon, 12 Aug 2002 05:37:53



> > Hello,

> > I have just started using FreeBSD 4.5. I use Apache Server 2.0.39
> > configurated with virtual host.
> > Before I use to function on Windows and everything was ok without DNS.
> > So since I change to FreeBSD platform, my virtuals hosts don't function
> > anymore and I don't know why !
> > How do I make my v.h function ??
> > I tried several things from the newsgroups advices without success.
> > My research were in /etc/hosts.* and I didn't understand what to do.
> > I have a LAN connection and my IP address seldom changes (about every 6
> > months). I utilize the dyndns.org services.
> > The principal name server and name of my computer are as :
> > principal.dyndns.org
> > The users (vh) are named : user1.dyndns.org, user2.dyndns.org, and
> > more...

> Do virtual hosts function properly from outside the internal network?  I ran
> into this same problem when I put my OpenBSD router/firewall in place.  You
> can't NAT out of the network and then back in again.  From anywhere on the
> internet the virtual hosts worked fine, but from inside the network (behind
> NAT) they didn't.  My solution was to add the necessary virtual hosts to my
> /etc/hosts file, and now they work both internal and external.

> Not sure if this is your problem, but if you need any more help just post
> some more details.

> -Matt

Hy Matt,
Thanks you for your response so quickly.
I tried to edit the /etc/hosts file by inscribing my IP address and name
virtual host like

xxx.xxx.xxx     principal.dyndns.org
xxx.xxx.xxx     user1.dyndns.org
xxx.xxx.xxx     user2.dyndns.org
and more ...
I stop Apache and /etc/netstart
Nothing changed

The problem is very simple for somebody who is able to play with the
user domain name in a server system on a daily base. My goal is to
reroot the user name where I permitted to do without DNS.

This is a example of my Apache 2.0.39 configuration

<VirtualHost _default_:*>
       DocumentRoot "/my/path/to/principal"
       ServerName principal.dyndns.org
</VirtualHost>

<VirtualHost *>
       DocumentRoot "/my/path/to/principal"
       CustomLog "/my/path/to/principal/logs/access.log" combined
       ServerName principal.dyndns.org

        <Location /protected>
               Order deny,allow
               Deny from all
               Allow from ipclient
       </Location>
</VirtualHost>

<VirtualHost *>
       DocumentRoot "/my/path/to/user1"
       CustomLog "/my/path/to/user1/logs/access.log" combined
       ServerName user1.dyndns.org

        <Location /protected>
               Order deny,allow
               Deny from all
               Allow from ipclient
       </Location>
</VirtualHost>

At the level of FreeBSD, do I have to configurate the domain user if so
how and where ?

Do I have to change anything in what I have already done ?

# -- sysinstall generated deltas -- # Thu Jul  4 16:05:17 2002
# -- sysinstall generated deltas -- # Thu Jul  4 17:02:59 2002
# Created: Thu Jul  4 16:05:17 2002
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
font8x14="iso-8x14"
font8x16="iso-8x16"
font8x8="iso-8x8"
hostname="principal.dyndns.org"
ifconfig_ed0="DHCP"
ipv6_enable="YES"
kern_securelevel_enable="NO"
linux_enable="YES"
moused_enable="YES"
moused_port="/dev/cuaa0"
moused_type="microsoft"
nfs_reserved_port_only="YES"
sendmail_enable="YES"
sshd_enable="YES"
#usbd_enable="YES"
# -- sysinstall generated deltas -- # Sat Jul  6 06:22:29 2002
#gateway="YES"

These are my resolv.conf file.
When I add the directive domain and all the names of the domain, and
after reboot it came out like this :

search
nameserver 24.201.245.xxx
nameserver 24.200.243.xxx
nameserver 24.200.243.xxx

I'm sure that before I used FreeBSD, my virtual hosts work fine. I still
believe that I made a mistake or forgot to do something. With all this
information can you help me ?

Thanks.
Marc

 
 
 

Web Server with FreeBSD, Help me !

Post by Marc Dieric » Mon, 12 Aug 2002 06:56:50


Hi Matt,
I'm so confuse because I found my mistake, it was a simple omission in
my Apache configuration file; just I forgot to declare the
nameVirtualHost directive (so stupid).
But if you have any suggestions about my freeBSD configuration they are
very welcome.

Thank you very much for your time and your help.
Marc


> > Hello,

> > I have just started using FreeBSD 4.5. I use Apache Server 2.0.39
> > configurated with virtual host.
> > Before I use to function on Windows and everything was ok without DNS.
> > So since I change to FreeBSD platform, my virtuals hosts don't function
> > anymore and I don't know why !
> > How do I make my v.h function ??
> > I tried several things from the newsgroups advices without success.
> > My research were in /etc/hosts.* and I didn't understand what to do.
> > I have a LAN connection and my IP address seldom changes (about every 6
> > months). I utilize the dyndns.org services.
> > The principal name server and name of my computer are as :
> > principal.dyndns.org
> > The users (vh) are named : user1.dyndns.org, user2.dyndns.org, and
> > more...

> Do virtual hosts function properly from outside the internal network?  I ran
> into this same problem when I put my OpenBSD router/firewall in place.  You
> can't NAT out of the network and then back in again.  From anywhere on the
> internet the virtual hosts worked fine, but from inside the network (behind
> NAT) they didn't.  My solution was to add the necessary virtual hosts to my
> /etc/hosts file, and now they work both internal and external.

> Not sure if this is your problem, but if you need any more help just post
> some more details.

> -Matt

 
 
 

1. FreeBSD Web servers (was Re: NT server vs workstation for WWW server)

    FreeBSD is available for downloading at ftp.cdrom.com (which
itself is an impressive machine running FreeBSD 2.0).  The 2.0.5
CD-ROM should be available RSN.  Run it on a $2000 486 box and you've
got a very nice Web server.  It also runs NCSA httpd 1.4 in pre-fork
mode, supports virtual network interfaces right out of the box (no
need for VIF patches, or limiting yourself to just two IP addresses)
and the commercial Netsite BSD server runs on FreeBSD.  Note that
Linux supports none of the above.  ;-)

   See http://140.109.40.248/~taob/Bench/ for some notes on FreeBSD as
a Web server (running Apache and NCSA httpd).

[comp.infosystems.www.servers.ms-windows removed from followups]
--
Brian ("Though this be madness, yet there is method in't") Tao

2. dynamic ip == no hostname?

3. pl/sql cusror state using Oracle web agent, web server & database server

4. Solstice DiskSuite and Striping Parameters

5. NT Web Server : Seeking beta testers for Windows 95, Windows NT Web Server

6. help: seg fault handling

7. Can A Web Server connect to another Web Server ....??

8. SiS6215C video driver needed...or fix

9. Linux Web server vs. Sun web server?

10. Directing Win2K Web Server to a Linux Web Server

11. Sun Web Server and JAVA Web Server

12. What is needed for minimal home FreeBSD test web server?

13. FreeBSD server, NT web design app and database integration problem