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.