IMX53-Android-httpd server

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IMX53-Android-httpd server

跳至解决方案
3,376 次查看
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.

标签 (2)
1 解答
2,595 次查看
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 项奖励
回复
10 回复数
2,595 次查看
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.

2,595 次查看
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 项奖励
回复
2,595 次查看
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 项奖励
回复
2,595 次查看
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 项奖励
回复
2,595 次查看
waterzhou
Contributor V

HI,

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

0 项奖励
回复
2,595 次查看
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 项奖励
回复
2,595 次查看
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 项奖励
回复
2,595 次查看
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 项奖励
回复
2,596 次查看
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 项奖励
回复
2,595 次查看
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 项奖励
回复