# Proper cgi-bin location



## abishai (Dec 17, 2018)

Where to put cgi-bin folder for a port with php and perl parts? I can't decide 
/usr/local/www/${PORTNAME}/cgi-bin or just put it to /usr/local/libexec and leave php part in /usr/local/www/${PORTNAME} alone? NetBSD hier has exact answer for this question, ours - are not.


----------



## SirDice (Dec 17, 2018)

PHP files can go to /usr/local/www/${name}/public for example, cgi-bin to /usr/local/www/${name}/cgi-bin.

Just look at how Apache sets up the defaults in /usr/local/www/apache24.


----------



## abishai (Dec 17, 2018)

Is it bad to put php files in the same directory with cgi-bin ?


----------



## SirDice (Dec 18, 2018)

Yes. They're called differently and would create a rather big security risk.


----------

