Click to See Complete Forum and Search --> : Apache config


mohapi
01-23-2003, 11:37 PM
Inside my home network I've got a new box ready to recieve the install .tgz which is sitting on my RedHat 8.0 box waiting to be sent over the network to be installed on the new ipcop box. I've got my apache server turned on [I think !!] ,but I don't understand where to put the ipcop.tgz file so the apache server will serve it to the ipcop box.
My /etc/httpd/conf/httpd.conf says that the

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

so I put the ipcop.tgz file into
/var/www/html/ipcop.tgz , and my server name
is 192.168.0.152:80 being the IP address & listening port of my RedHat box. This doesn't work so I didn't do this right.

Now I see that when I run;
/usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
my error message is;

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down

The following is from the Ipcop site.
1.4.4. Making The Installation File Available

This step is only needed if you are installing from bootable floppy and FTP/Web Server. In the root directory / of the iso image there is a file named ipcop.tgz. This file contains a compressed image of the IPCop hard drive. Copy this file to a machine that is running a web server or FTP server. Put it where the server can find it during install. During the install, IPCop will log in to your FTP or web server as anonymous. Most servers do not allow anonymous users to access files out of the server's hierarchy. Even though a directory appears at the top level of the server, such as /pub they really are somewhere else, such as /anonftp/pub.

If you are creating your private network for the first time, change the IP address of the server machine to be on the private, GREEN, network, using a static address. You only need to do this for the duration of the install.

If your server machine is connected to the Internet, remove the connection and physically connect your IPCop PC and other machines together. See Appendix A, for a discussion of your choices. If you are using 192.168.1.1 for the IPCop PC, 192.168.1.2 is a good address for the server. Set the server up with a static IP address, temporarily. You will need to reboot any Windows PC if you change its IP address.

Verify that the IPCop installation file is available via the FTP command or entering its URL from a browser, even if you have to do it from the server machine. You can cancel the download or close your browser once you are sure the URL works.

This Apache is confusing.
Thanks, Dirk

mohapi
01-24-2003, 01:13 AM
In conjunction with or as opposed to my earlier post, how do I setup a file on my RedHat 8.0 machine within my home network so
that I can ftp:// and download that file to another machine in my home
network?
Dirk

HighOrbit
01-24-2003, 11:30 AM
Ok.. I'm not familar with IPCop, but I am familiar with apache.

You ServerName is usually the syntax "yourbox.yourdomain.com" and not an IP address and port. The syntax "192.168.0.152:80" is usually what goes on the Listen line of the httpd.conf.

From the error message, it sounds like your server is trying to bind/listen on 443 which is the SSL port. If you are running SSL you might also need something like "Listen 192.168.0.152:443" to get it to bind SSL on that port for your IP address.

You should take some time to read the apache documentation. It can be found at www.apache.org. There are also lots of "how-to" documents at www.tldp.org (The linux documentation project).

mohapi
01-25-2003, 01:22 PM
Thanks. I've been reading those pages as well as others I've found, but I'm much better with graphical instructions. My right brain comprehends better than my left and those pages I've looked at so far are difficult for me to grasp. It's much easier for me to ask "how did you do it", than to wade through barely [to me] decipherable script.

Gaston
01-26-2003, 07:59 AM
In conjunction with or as opposed to my earlier post, how do I setup a file on my RedHat 8.0 machine within my home network so
that I can ftp:// and download that file to another machine in my home
network?
Dirk

You don't mention what the other machine on your network
is but if it's linux box, why don't you use scp or sftp (secrure copy and secure file transfer protocol respectively)

I'd suggest you try to avoid using ftp because it's sending everything over the ether in clear text and is a good candidate
for sniffing. Wrongly configured ftp server and you'll give
hackers good way to gain root/user level access to your box.

sftp more or less works the same way as ftp, just run
sftp host and then login

about scp, to copy file called foo in current directory to server lala directory /tmp,
you'd do:

scp foo lala:/tmp

more info:

http://www.openssh.org/manual.html

Don't think there's a free ssh/scp/sftp client for windows
but you should get into habit using putty for example
to login to your linux box via windows platform and disable
services like telnet/ftp to start with on your linux box.


http://www.chiark.greenend.org.uk/~sgtatham/putty/

mohapi
01-26-2003, 12:07 PM
Thanks Gaston and High Orbit. The ipcop box is an empty machine inside my home network , [ which has a stand alone ipcop box of its own protecting the home network] , and I'm attempting to put together another ipcop system on the empty box using one of my home network linux boxes as the server for the ipcop install .iso. All boxes are linux.

MattCauth
01-28-2003, 11:59 PM
Inside your apache config you'll see a couple of directives that allow you to bind to a specific port on your machine.

I'm not familiar with Ipcop at all, but I assume you'll want to run your apache only on your internal private network. To do this, look for a directive named Listen.

Example:
Listen 192.168.100.1:80

This will bind the apache instance to IP address 192.168.100.1 on port 80. Comment out any Port directives that may be in there, and just get things started using Listen. It's better overall anyhow, as it's more fine-grained.

Your error is telling you that something else is binding to port 443, which sounds like you (or your OS on startup) have started an apache already, and it's bound to that port.
type "netstat -an |grep 443" and it's pretty likely you'll see something bound to that port. ps -ef (or -aux) and look for httpd. Then kill the process. Your port will free up then.

Unless you want to run SSL, comment out the SSL virtual host in your default apache config., as well as any "Port 443" type directives. This should get you rolling. Also - remember you'll need to be root to bind to any ports below 1024.

Have fun, hope this helps.
Matt