# apache and mysql will not start without net.eth0 [solved]

## cwc

I'd like to run apache and mysql along with php to run without a network connection so I can code in php offline.  

I can't recall what I have to turn off for apache2 and mysql when I don't have eth0 up.

Thanks,

cwc

edit /etc/init.d/apache2 & /etc/init.d/mysql

----------

## DONAHUE

/etc/init.d/apache2 contains

 *Quote:*   

> 
> 
> depend() {
> 
> 	need net
> ...

 

edit to

 *Quote:*   

> depend() {
> 
> 	#need net
> 
> 	use mysql dns logger netmount postgresql
> ...

 

may get what you want

----------

## andreas_st

You might have to edit your apache configuration too if you have an IP address in a Listen statement.

----------

## cwc

 *DONAHUE wrote:*   

> /etc/init.d/apache2 contains
> 
>  *Quote:*   
> 
> depend() {
> ...

 

thanks for the tip.  I also had to disable netmount postgresql dns 

this is the part of the script that worked:

depend() {

	#need net netmount postgresql dns 

	use mysql logger  

	after sshd

}

thanks again!

----------

## cwc

 *andreas_st wrote:*   

> You might have to edit your apache configuration too if you have an IP address in a Listen statement.

 

where would this be located?  httpd.conf?

----------

## CooDy

/etc/apachce2/httpd.conf

or if you use the default_vhost statement in /etc/conf.d/apache2 you could also have it in /etc/apache2/modules/00_default_vhost

----------

## andreas_st

 *cwc wrote:*   

>  *andreas_st wrote:*   You might have to edit your apache configuration too if you have an IP address in a Listen statement. 
> 
> where would this be located?  httpd.conf?

 

```
grep -r Listen /etc/apache2/*
```

----------

## cwc

 *andreas_st wrote:*   

>  *cwc wrote:*    *andreas_st wrote:*   You might have to edit your apache configuration too if you have an IP address in a Listen statement. 
> 
> where would this be located?  httpd.conf? 
> 
> ```
> ...

 

that's slick!  I need to use grep more.  thanks for the tip

----------

