Re: Apache Settings in Breezy
From: J.O. Aho (user_at_example.net)
Date: Mon, 14 Nov 2005 10:48:15 +0100
> i don't know how to open port 80 on ubuntu. fedora has that option easily
> on the security settings menu (GUI). i read that ubuntu by default does
> not allow any incoming connections, thus not really needing a firewall
> (newbie friendly). i also am not aware of any firewall running on my
firewalls in linux are iptable rules and to close all incoming ports you use
iptables, as the default are everything open.
# --- script starts next line --- #
MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \ -f 1`
iptables -t filter -A INPUT -p tcp -s 0/0 -d $NET --dport 80 -j ACCEPT
# --- script ended previous line --- #
You can run that script on your machine and it should open your port 80, but
still it could have troubles depending on which rule is considered first.
> my files are set to be able to be read globally (others) but not write and
The files has to only be readable by the user that the apache2 is running as,
usually it's the apache or http user, but there are some bad distros that uses
nobody as the user. But as you locally already can access the apache server
and see the pages, thats already fixed.
> how do i change the apache2 settings? which file in particular is that? i
> don't have a static ip address so is there a way to set it to my session
> ip address automatically?
If you have dynamical ip-address, then remove the 'ServerName localhost'
entry, or use a DynDNS service and then set the ip-name you got there instead
of the 'localhost'.
See to that your virtual hosts (if you use such) don't have an ip-number, but
uses the '*' instead.
The configuration file usually can be found at /etc/apache or /etc/httpd or a
subdirectory to one of those and it's usually called apache.conf or httpd.conf.