IMX53-Android-httpd server

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX53-Android-httpd server

Jump to solution
2,443 Views
praveenkumard
Contributor II

Hi everone,

     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.

Labels (2)
1 Solution
1,662 Views
NitinGarg1z
NXP Employee
NXP Employee

Praveen,

These commands require root permissions. I think you cannot execute these cmds via webserver as its not root account instead its www.

Regards,

Nitin

View solution in original post

0 Kudos
10 Replies
1,662 Views
waterzhou
Contributor V

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.

1,662 Views
praveenkumard
Contributor II

Hi  waterzhou

     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.

0 Kudos
1,662 Views
waterzhou
Contributor V

HI, praveenkumard,

     Any full failed log? Maybe you can attached it here? Then maybe I can help you to analysis it.

0 Kudos
1,662 Views
praveenkumard
Contributor II

Hi,

     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.

0 Kudos
1,662 Views
waterzhou
Contributor V

HI,

     Have you tried running httpd-server in console manually after #su to root?

0 Kudos
1,662 Views
praveenkumard
Contributor II

     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.

0 Kudos
1,662 Views
waterzhou
Contributor V

HI, Kumar,

     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?

0 Kudos
1,662 Views
praveenkumard
Contributor II

Hi Zhou,

    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?

0 Kudos
1,663 Views
NitinGarg1z
NXP Employee
NXP Employee

Praveen,

These commands require root permissions. I think you cannot execute these cmds via webserver as its not root account instead its www.

Regards,

Nitin

0 Kudos
1,662 Views
praveenkumard
Contributor II

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.

0 Kudos