Issue
I'm wanting to install https://github.com/phpseclib/phpseclib but it seems it's made for an Apache environment is there any way to install it on Nginx? (Debian 7_64Bit)
Solution
phpseclib can be installed in a multitude of ways. The
Their website has a zip file you can download. So one solution would be just to unzip it, put it in your document structure and then update your include_path as appropriate. eg. (from the phpseclib website)
include('Net/SSH2.php');
You can install phpseclib 1.0 via PEAR. To get PEAR installed you'll need to do
sudo apt-get install php-pear
. After that go to http://phpseclib.sourceforge.net/pear.htm for further instructions.You can install phpseclib via composer. To get composer working you'll need to do
sudo apt-get install php5-cli
and then I'd do the 1.0 branch, personally, as it is better documented than the 2.0 or master branches. If you have more questions on how to use composer you should ask a new question and give it a composer tag.
That said, none-of-these are "written for Apache". Take Composer. It manages auto-loading for you but the tool they provide is written for the command line. It's not written for nginx nor is it written for Apache.
I mean, seriously, people have been doing Composer with Nginx for a long time. People have also been doing cronjobs with Nginx for years. You don't need Apache installed to run PHP on the CLI.
Answered By - neubert