GNURoot in Action–A Real Web Server On Android

In this tutorial, I will show you how to install nginx and enable PHP on nginx.

Install php5-fpm and nginx

edit configure(/etc/nginx/sites-available/default)

change listen port to 8080(or any number >1024)

add index.php to index

uncomment some lines to enable PHP on nginx

start service,

then visit http://localhost:8080 on your phone, or http://ip-of-your-android:8080

and by default, the root is,

you can change it in your configure.

 

Let’s create a PHP example, /usr/share/nginx/www/info.php with the content,

then visit http://localhost:8080/info.php

Feel free to have a look the output from my phone,info.php.pdf( created with wkhtmltopdf 0.12.1 on gnuroot).

P.S.

I tried Apache before nginx, when restart apache, I always got this error,

I tried to

but does not work.

 

nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP proxy server, originally written by Igor Sysoev.

Leave a Reply