HTTP Server Setup

Source: Internet
Author: User

First method: Use Tomcat to build a file server

1. Configure in the Tomcat directory

Put the file directly in the Tomcat6/webapps/root directory and then access it in the URL: Http://192.168.2.31:8080/download.zip can be downloaded.

2. Configure in other directories

If you don't want to put it under Webapps/root, configure the directory you want to download:

Create an arbitrary file name XML file under the Tomcat installation directory \conf\catalina\localhost, such as: Download.xml, as follows:

[HTML] View plaincopy<?xml version= "1.0" encoding= "UTF-8"?> <context path= "/download" docbase= "D://download" Crosscontext= "true" > </Context>

Modify the Tomcat configuration file, file directory \conf\web.xml, to change the red false to true.

<servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servle Rsh          Defaultservlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listi ngs</param-name> <param-value>false</param-value> </init-param> <load-on-sta Rtup>1</load-on-startup> </servlet>

Second way: Using Apache server


HTTP Server Setup

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.