Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running a Yii php web application on Ubuntu 12.04. It was working great for a while but now it refuses connects to port 80 about 80% of the time. Every once in a while it will work fine for a minute or two.

  • Netstat says the port is listening.
  • When I try to ncat to the port it says the target machine actively refused the connection.
  • I have no iptables setup.
  • The server is on a virtualbox vm running on a Windows 7 desktop. I can ping the ubuntu vm from the desktop.

Here is my /etc/apache2.cfg

LockFile ${APACHE_LOCK_DIR}/accept.lock

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5


<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_event_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}


AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files> 

DefaultType None


HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

Include mods-enabled/*.load
Include mods-enabled/*.conf

Include httpd.conf

Include ports.conf

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\""      vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent


Include conf.d/

Include sites-enabled/

Most of the time it will refuse to connect, but sometimes it can load the index.html file, but none of my php files.

Any ideas?

share|improve this question
add comment

1 Answer

You have Skype on host or vm? Skype uses port 80 by default if not changed by the user. It may interfere with your apache.

share|improve this answer
    
No skype is not installed on the vm or the desktop. Thanks though. –  StaticMethod Mar 5 '13 at 19:09
    
Have you installed apache on host OS? –  gexas Mar 5 '13 at 20:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.