Simple Procedure for configuring webserver in linux

Source: Internet
Author: User
: This article describes how to configure webserver in linux. For more information about PHP tutorials, see. 1. install nginx

aptitude install nginx

2. Configure nginx

1. View nginx status, start, reload, and other commands
    service nginx status    service nginx start    service nginx reload
2. add the VM to create a related folder in/etc/nginx/conf. d and put the configuration file under the folder. Configuration File example: vhosts_sample.conf
Server {listen8080; # port root/usr/share/nginx/wlj; the ghost web page file is stored in "indexindex.html index.htm; # Make site accessible from http: // localhost/server_name wljcloud.com; # domain name location/{# First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $ uri/= 404; # Uncomment to enable naxsi on this location # include/etc/nginx/naxsi. rules }}
3. modify nginx. conf file. add the path to the http segment, for example, include/etc/nginx/conf. d/vhosts_conf /*. conf; 4. place the webpage file in the configured path
Cp-r file source path/usr/share/nginx/wlj
5. reload the nginx configuration file
    service nginx reload

3. access the site

Example: 101.201.196.130: 8080/index.html

'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
  • '). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script

    The above describes the simple steps for configuring webserver in linux, including some content. I hope my friends who are interested in the PHP Tutorial can help me.

    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.