# cgi-bin missing

## dtjohnst

Either I did something silly (most likely scenario) or it's not used anymore and I'm just losing my mind, but my /var/www/localhost/htdocs/cgi-bin folder is missing. I'm pretty sure Apache used to install a few other folders in there as well, though I can't remember them off hand. I tried re-emerging apache but that created /var/www/local/htdocs/index.html and nothing else. No cgi-bin folders, no nothing. I checked /usr/lib/cgi-bin since Apache puts it there on some other distros, but no joy. So I tried searching for cgi-bin with find, but nothing came up.

So...how can I get it back? My webserver is empty, so I have no problems re-emerging things as needed.

----------

## oldnavy23

Yep its there on my newest install. Did you install with php USE Flag ?

----------

## dtjohnst

Yes. Also tried reinstalling PHP as well.

----------

## oldnavy23

What about  un-emerging Apache  Removing the folder  /var/www  and then do re-emerge ?

----------

## cach0rr0

 *dtjohnst wrote:*   

> Either I did something silly (most likely scenario) or it's not used anymore and I'm just losing my mind, but my /var/www/localhost/htdocs/cgi-bin folder is missing. I'm pretty sure Apache used to install a few other folders in there as well, though I can't remember them off hand.

 

For me cgi-bin is not in the document root, but rather

```

gentoob0x cgi-bin # pwd

/var/www/localhost/cgi-bin

```

And aliased with

```

ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/"

```

within default_vhost.include (/etc/apache2/vhosts.d/default_vhost.include)

SO, the million dollar question, do you have a /var/www/localhost/cgi-bin ?

----------

## dtjohnst

 *cach0rr0 wrote:*   

>  *dtjohnst wrote:*   Either I did something silly (most likely scenario) or it's not used anymore and I'm just losing my mind, but my /var/www/localhost/htdocs/cgi-bin folder is missing. I'm pretty sure Apache used to install a few other folders in there as well, though I can't remember them off hand. 
> 
> For me cgi-bin is not in the document root, but rather
> 
> ```
> ...

 

No sir.  *dtjohnst wrote:*   

> So I tried searching for cgi-bin with find, but nothing came up.

 

I should have specified I began my find with /. So I do not have a cgi-bin directory anywhere on my system. I couldn't remember where it was. I was just browsing through my tree today and went, "Hey wait a second, wasn't there a cgi-bin, error and icons folder somehwere here before?" So I went looking for it, and found it nowhere.

I didn't remove www because it's a partition mountpoint. But, I did reformat that partition and remount it before a re-emerge, still didn't create my cgi-bin, error and icons folders.  :Sad:  I suppose I could unmount the partition, delete /var/www, re-emerge, see if the folders get created, then copy the folders over and remount.... I might try that tomorrow if no one else comes up with anything, but right now, it's bed time.  :Smile: 

Grr. Decided to try it before bed. Unmounted /var/www then deleted /var/www. Unmerged apache AND php. Re-emerged them. Same result. I have /var/www/, /var/www/localhost, /var/www/localhost/htdocs, and /var/www/localhost/htdocs/index.html

What's left? Reformat my entire machine and start over?  :Wink: 

----------

