Error in Apache: /var/run/apache2 not found

Posted by Julen on Server Fault See other posts from Server Fault or by Julen
Published on 2011-03-24T13:15:04Z Indexed on 2012/06/04 10:44 UTC
Read the original article Hit count: 389

Filed under:
|
|

This is more self-answered question but since it drove me crazy I would like to share with the community and maybe someone can tell me why it happened or what it caused.

The thing is I wanted to install in my Ubuntu 10.4 machine a CGI app, one built in the samples that come with the gSOAP toolkit. My intention was to access those from ASP .NET machine.

Regular Ubuntu does not come with Apache so I install it from Sypnatic. Pretty easy. I followed this How to Install Apache2 webserver with PHP,CGI and Perl Support in Ubuntu Server. Instead of apache.conf I tweaked httpd.conf since a college here used that file instead of the first to put his Apache running. Besides I was able to access his CGI from my ASP .NET but mysteriously I could not from mine, I was getting always "The request failed with HTTP status 503: Service Temporarily Unavailable".

Checking Apache error.log I found these messages:

No such file or directory: unable to connect to cgi daemon after multiple tries: /home/julen/htdocs/cgi-bin/calcserver

And looking more carefully whenever I restarted Apache I got this other message

No such file or directory: Couldn't bind unix domain socket /var/run/apache2/cgisock.
cgid daemon failed to initialize

I am pretty new with Ubuntu and I could not think that Apache and Synaptic made a mistake in the installation process of the server, but it is true that the /var/run/apache2 was missing whereas in my college's computer was not. I tried to find and "elegant" solution but I found a post from 2006 that had an slight reference to it.

Finally I decided to create the folder myself (as root) and then everything worked fine.

Hope this helps others if they encounter a similar problem. Still I have the doubt why the folders was not created in the first place.

Best,

Julen.

© Server Fault or respective owner

Related posts about ubuntu

Related posts about apache2