Re: [users@httpd] Hacked the website replace the index.hm page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stuart Low wrote:
PHP as a CGI also requires users (read, typically, morons) to add a
shebang line to their scripts.

No, it doesn't. Set up a handler of the PHP files, so it'll get called based on file extension just like the users expect.

Snipped from one of our vhosts:

ScriptAlias          /php-bin/ "/var/www/cgi-bin/php-sbox/"
AddHandler           exec-php .php
Action               exec-php "/php-bin/"

The "php-sbox" is a CGI wrapper compiled to call the php binary to run the PHP file.

(The "/var/www/cgi-bin" is *not* a cgi-bin directory for any host (in case someone thought it was due to it's path beeing the same as in the default documentroot of many APache installs.))

Regards
/Jonas

--
Jonas Eckerman, FSDB & Fruktträdet
http://whatever.frukt.org/
http://www.fsdb.org/
http://www.frukt.org/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux