Re: Apache Settings in Breezy

From: J.O. Aho (user_at_example.net)
Date: 11/14/05


Date: Mon, 14 Nov 2005 10:48:15 +0100

Nitewolf wrote:

> 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
> system.

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 --- #
#!/bin/sh
MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \ -f 1`
NET=$IP/$MASK

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
> execute.

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.

 //Aho



Relevant Pages

  • Re: PHP runs in WinXP command window but not in browser
    ... I've been trying to run Apache which I downloaded from http://www.wampserver.com/en/. ... Every sane firewall, including ... the WAMP setup and making sure you've dotted all the tees and crossed all ... Get that Apache working THEN worry about making PHP hook up to ...
    (comp.lang.php)
  • Re: 50+ unwanted messenger popups per day - worse than spam, help
    ... Messenger, in this case, is acting like a "canary". ... packets into your system. ... You can do this using a firewall. ... the firewall completely, disallowing all incoming connections. ...
    (microsoft.public.windowsxp.security_admin)
  • SUMMARY: Sun IP configuration
    ... hammer" approach by having a range of IP addresses set up in the firewall. ... > Subject: Sun IP configuration ... > Apache posts data it is sent from the primary ip address, ...
    (SunManagers)
  • Re: The connection was refused when trying to connect to ...
    ... Really having a hard time getting my apache web server ... >> When setting up my server initially I set up with medium firewall, ... >> thinking I could modify the settings later. ... Either Apache is not listening to the outside world, ...
    (comp.os.linux.misc)
  • Re: Silicon Image SIL680 RAID Controller
    ... the exact procedures required to setup and configure a web server ... that's running apache. ... I read that and I definitely will use a firewall. ... But, to get apache, I had to install the entire Packages ...
    (comp.unix.bsd.freebsd.misc)