[nzlug] Apache Restarting Problems

Rob bubaphex at gmail.com
Wed Mar 19 13:55:30 NZST 2008


great ! thanks this works.

I ran into another problem, my virtual hosts dont work now that i've
restarted it. my domain points to the ip address of the server but it only
shows the root directory no the the individual vh dir. This looks rite to me
but is it ?

### Section 3: Virtual Hosts


NameVirtualHost my.uber.ip.address:80


# my 1st VH
<VirtualHost my.uber.ip.address:80>
    ServerAdmin me at mydomain.co.nz
    DocumentRoot /var/www/html/mydir1/
    ServerName mydomain1.co.nz
    ServerAlias www.mydomain1.co.nz
    ErrorLog /var/www/apachelogs/error/1my_error_log.txt
</VirtualHost>

# My 2nd VH
<VirtualHost my.uber.ip.address:80>
    ServerAdmin me at mydomain.co.nz
    DocumentRoot /var/www/html/mydir2/
    ServerName mydomain2.co.nz
    ServerAlias www.mydomain2.co.nz
    ErrorLog /var/www/apachelogs/error/2my_error_log.txt
</VirtualHost>

# My 3rd VH
<VirtualHost my.uber.ip.address:80>
    ServerAdmin me at mydomain.co.nz
    DocumentRoot /var/www/html/mydir3/
    ServerName mydomain3.co.nz
    ServerAlias wwww.mydomain3.co.nz
    ErrorLog /var/www/apachelogs/error/3my_error_log.txt
</VirtualHost>

On Wed, Mar 19, 2008 at 2:27 PM, Hadley Rich <hads at nice.net.nz> wrote:

> On Wednesday 19 March 2008 14:24:02 Rob wrote:
> > thanks for the reply's guys
> >
> > netstat -plnt | grep 80 gave me this:
> >
> > [root at me ~]# netstat -plnt |grep 80
> > tcp        0      0 0.0.0.0:5801                0.0.0.0:*
> > LISTEN      2070/Xvnc
> > tcp        0      0 0.0.0.0:5802                0.0.0.0:*
> > LISTEN      2101/Xvnc
> > tcp        0      0 :::80                       :::*
> > LISTEN      1945/httpd
> > [root at me ~]#
> >
> > that random 0.0.0.0 thing
>
> 0.0.0.0 just means that the program is listening on all IP addresses on
> the
> system.
>
> So it looks like httpd (apache) isn't stopping for one reason or another.
>
> You should be able to kill it with `kill 1945` (as root). 1945 is the
> current
> process id of apache.
>
> hads
> --
> http://nicegear.co.nz
> VoIP, DVB and other Linux compatible hardware. Linux laptops.
>
> _______________________________________________
> NZLUG mailing list NZLUG at linux.net.nz
> http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
>


More information about the NZLUG mailing list