You are here Home > Know-how > Linux > Apache Webserver > Apache Tips

Linux Reference

4.1.1 Apache Tips


20.02.2008
4.1 Apache Webserver [  up  ] - [ top ] - [ linux a-z ] 4.1.2 Apache Links

  • Enable Long Directory Listing, Basic Auth and CGI

    # -- foo
    AddHandler cgi-script .cgi
    Options ExecCGI Indexes MultiViews
    IndexOptions +FancyIndexing +NameWidth=* +FoldersFirst +ScanHTMLTitles
    
    ## password begin ##
    AuthUserFile /var/www/html/foo/.passwd
    AuthName     "Foo / Bar."
    AuthType     Basic
    IndexOptions +NameWidth=* +FoldersFirst +ScanHTMLTitles
    <Limit GET POST PUT>
    require valid-user
    </Limit>
    <Files .passwd>
    deny from all
    </Files>
    ## password end ##
    

    → Save as .htaccess

  • Enable Long Directory Listing and CGI

    # -- foo
    
    AddHandler cgi-script .cgi .pl
    Options ExecCGI Indexes MultiViews
    IndexOptions +FancyIndexing +NameWidth=* +FoldersFirst +ScanHTMLTitles
    

  • Protect a CGI directory with .htaccess

    httpd.conf
    <Directory "/usr/local/apache2/cgi-bin">
        AllowOverride AuthConfig Limit
        Options FollowSymLinks
        Order allow,deny
        Allow from all
    </Directory>
    

    Make a sub directory e.g. prot in your cgi-bin directory and put this .htaccess file into the prot directory:
    # -- foo
    
    ## password begin ##
    AuthUserFile /usr/local/apache2/cgi-bin/proj.passwd
    AuthName     "Foo / Bar."
    AuthType     Basic
    <Limit GET POST PUT>
    require valid-user
    </Limit>
    <Files .passwd>
    deny from all
    </Files>
    ## password end ##
    
4.1   Apache Webserver
 4.1.1  Apache Tips
 4.1.2  Apache Links
 4.1.3  mod_proxy
 4.1.4  mod_rewrite
4.2   FTP
4.3   Samba (File Server)
4.4   NFS Server
4.5   Messaging, E-Mail
 4.5.1  POP / IMAP
 4.5.2  Sendmail
 4.5.2.1  Procmail
 4.5.3  SPAM / Spamassasin
4.6   Virtualization with Xen
 4.6.1  Graphical Setup with Xen
 4.6.2  Xen Geek Problems
4.7   DNS with Bind 9




See also:



copyright by retoh - created with mytexi