I need to start apache(httpd) web server on Imx53-Qsb android os, Could anyone please help me how to cross compile the httpd source or how to use the busybox httpd and how i can configure the httpd.conf for busybox httpd.
These commands require root permissions. I think you cannot execute these cmds via webserver as its not root account instead its www.
1. If you want to compile the httpd source in your own project. You can download the soure in the below link. and compile i t in external/apache-http
apache-android-httpd - This is Apache HTTPD for Android - Google Project Hosting
2. If you want to directly use busybox httpd,
#httpd -p 80 -h /documentroot -c /etc/httpd.conf
One httpd.conf example is attached.
Hope above info can help you.
Hi Jianzheng Zhou,
Thanks for your valuable information, now i am able to start http server, but When the server is trying to create a process its being killed unexpectedly i tried with giving the permissions 777 and 755 but it doesn't worked.
HI, praveen kumar,
Any full failed log? Maybe you can attached it here? Then maybe I can help you to analysis it.
I didnt get any log in error_log file. I have downloaded the apache-for-android source but they are binaries instead can you tell me how can i configure the httpd open source.
Now i am able to run the httpd server with the binaries given by you but now iam facing an issue related to permissions.
The error in the log is "Operation not permitted" for the file, but i tried by giving permissions 777,755 but it doesnt worked should i change anything in the httpd.conf so that the cgi files can execute a particular file. In httpd.conf i have given User as system and Group as root, So please help me in solving the issue.
Have you tried running httpd-server in console manually after #su to root?
I am able to run the httpd server and able to access my web page contents but when i try to execute an ifconfig eth0 x.x.x.x its giving error "cannot open control socket permission denied", and iam able to run the command on console manually.
About this , I think maybe caused by race operation for eth0. As you know, eth0 is using by http-server while you try to change it's ip address. Have you tried to ifconfig eth0 x.x.x.x. before you run httpd_server?
Thanks for the quick response, the problem is not only with the ifconfig but also with any command such as rmmod, insmod, busybox, etc i.e, i am not able to execute any command through web server as its giving the error as i mentioned above. I think the issue can be solved by sudo but in android i dont have sudo, so please tell me whether we have sudo for android or not?
Retrieving data ...