# [SOLVED]How to run apache when NetworkManager is inactive?

## jody

Hi

On my Laptop i have kernel 3.10.7-gentoo-r1, NetworkManager 0.9.8.8 and apache 2.2.25, and i use OpenRC (not systemd)

Whenever the WiFi is disconnected, NetworkManager goes into an inactive state and kills the NetworkManager.

I can't start apache manually when NetworkManager is inactive:

```
jody@raven ~ $ sudo /etc/init.d/apache2 start

 * WARNING: dnsmasq is scheduled to start when NetworkManager has started

 * WARNING: dnsmasq is scheduled to start when NetworkManager has started

 * WARNING: netmount is scheduled to start when NetworkManager has started

 * WARNING: apache2 is scheduled to start when NetworkManager has started

```

I am currently working on a local web app on my laptop, and I also want to work on it when i don't have access to a LAN.

So the question is: how can i run apache when the NetworkManager is inactive or stopped?

Thanks

  JodyLast edited by jody on Mon Mar 09, 2015 5:40 pm; edited 1 time in total

----------

## khayyam

 *jody wrote:*   

> So the question is: how can i run apache when the NetworkManager is inactive or stopped?

 

jody ... it should be sufficent to do the following:

/etc/rc.conf

```
rc_apache2_need="!net"
```

HTH & best ... khay

----------

## jody

Thanks - this works.

NetworkManager doesn't kill  apache anymore when i disconnect it from the LAN.

apache does, however, try to start NetworkManager when it is started itself.

But this is ok - the NetworkManaer is in state "inactive" but apache runs nonetheless.

Thank you

  Jody

----------

