Port the thttpd Web server to the arm-Linux System

Source: Internet
Author: User

Thttpd is a small Web server. It is a good choice for porting to arm. I configured it today and encountered some problems. When you make a backup, share your configuration experience.

Cc = arm-Linux-GCC./configure -- Host = arm-Linux-gcc
VI makefile
/* Specify static compilation to save the movement of the dynamic library */
Ldflags =-staticmake ldflags = "-static"
CP thttpd/usr/sbin (you can directly use the thttpd command)
VI thttpd/contrib/RedHat-RPM/thttpd. conf
/* ----- Modify the content as follows ------*/
Dir =/etc/thttpd/html
# Specify the webserver root directory for storing web pages
Chroot
User = root
# Run thttpd as root
Logfile =/etc/thttpd/log/thttpd. log # Log File Path
Pidfile =/etc/thttpd/run/thttpd. pid # PID file path
/* The setting of these variables depends on the actual situation */
CP thttpd/contrib/RedHat-RPM/thttpd. CONF/etc
CD/Home (directory on the Development Board)
Mkdir thttpd
CD thttpd
Mkdir html
(With an index.html file)
Mkdir log
(Thttpd. Log) // empty file
Mkdir run
(Thttpd. PID) // empty file

Place an index.html file in HTML
Test:
# Thttpd-C/etc/thttpd. conf

Then open the browser and enter the Development Board IP address to access it.

If you encounter a./thttpd: Unknown user-'root' problem, check the thttpd. conf file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.