Tag Archives: Web

Finding Index of/ directory with Google engines

Maybe you want to find faster and more efficiently. With this you can search specific files that are no easy to find on blogs or web pages linking them.. like mp3, rpm, deb, iso, rar files!! just type into google search:



?intitle:index.of? incubus

?intitle:index.of? ncdu rpm

?intitle:index.of? windows iso

Using cgi-bin directory in Apache

Recently I tried to install a web perl application that ask me to have CGI module enabled in the Apache Web server. I’m gonna show you how this option is enabled and how it works.

If your application call CGI module you have to put it on authorized directory (this use to have a name like “cgi-bin” on server’s hosts plan). E.g You have a web page in document Root:


and into this directory there’s an index.htm calling, on one of its links, an a application that uses CGI… so to get it work create a subdirectory:

/var/www/html/cgi-bin (this subdirectory may be on another system path like $HOME/www/cgi-bin or whatever you like but it has to be able to be read and execute)

and on the httpd.conf or Apache’s configuration file submit this:

ScriptAlias /cgi-bin "/var/www/html/cgi-bin/"
<Directory "/var/www/html/cgi-bin/">
 AllowOverride all
 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
 order allow,deny
 Allow from all

and add the file type for the application to be identified as cgi content:

AddHandler cgi-script cgi pl ; in this case is a perl app

Then reload Apache Web Server and put the application into authorized directory and redirect all the links that call it to that path.

note: Before try, make sure that your system has installed the cgi module and perl module and this last is enabled.


Just make a .htaccess on the directory you want to enable CGI content putting the option:


and obviously you should have the AllowOverride set to all on the apache’s configuration file for that directory:

<Directory /var/www/html/cgi-bin>
AllowOverride all

But the AddHandler option must be determinated.

IPTABLES: mapping ports with DNAT

If you want to redirect the web service for example, from the public IP address to a Private ones (located in your lan with private IP range) you use:

# iptables -t nat -A PREROUTING -p TCP --dport 80 -j DNAT --to-destination (replace with yours)

In this case I’m mapping the Web service from my Public Server to a Private ones.

Note: The Public server can have the port 80 closed in its firewall rules