Web and vsftp in linux

Source: Internet
Author: User
Web and vsftp in linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Here are two operations in linux:

A about web
1. Create a web server and configure it according to the following requirements:

(!) Set the path of the home directory to/var/www/web.



(2) Add index. jsp and index. php as the default document.

DirectoryIndex index. jsp index. php

(3) set apache listening port 8080

Listen 8080.

(4) set the default character set to GB2312.

Adddefacharcharset GB2312

2. Create a virtual directory named qianfang on the web server. The physical directory is/var/www/qianfang, and configure user authentication for the virtual directory. Only the user jsj is allowed, abc access

Alias/qianfang "/var/www/qianfang"



Options Indexes Unlitiviews

AllowOverride None

Order allow, deny

Allow from jsj, abc



3. Create a virtual directory named test 1 on the web server. The physical path is/var/www/test.

Alias/test1 "/var/www/test1"



Options Indexes Unlitiviews

AllowOverride None

Order allow, deny

Allow from all



4. Create an ip-based VM



DocumentRoot/var/www/namevhost1

DirectoryIndex index.htm index. php index.html




B. About vsftp

1. Establish an ftp server using vsftp

Start vsftp

Service vsftpd start

2. Create two users, user01 and user02, and the dual-user corresponds to the same directory.

First, use vi to open/etc/vsftpd. conf.

Write_enable = yes

Create directory aaa

Mkdir aaa

Create a user

Cd aaa

Useradd user01

Useradd user02

3. user01 has all permissions on the directory. user02 can only be downloaded and cannot be uploaded.

Modify permissions

Chmod? R 755/aaa

4. Place the user in your own directory and do not jump to other directories in the system during login.

Use gedit to open the configuration file/etc/vsftpd. conf

Remove the "#" in # chroot_list_enable = YES.

Save and restart

Service vsftpd restart

For reference only!
Related Article

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.