Linux configuration webserver easy steps

Source: Internet
Author: User
1. Installing Nginx

install nginx

2. Configure Nginx

1.查看nginx状态,启动,重载等命令
    service nginx status    start    service nginx reload
2.添加虚拟主机在/etc/nginx/conf.d中建立相关的文件夹,将配置文件放到该文件夹下。配置文件例:vhosts_sample.conf
    server {        listen8080;  #端口        root /usr/share/nginx/wlj;   #网页文件存放路径indexindexindex.htm;        # Make site accessible from http://localhost/        server_name wljcloud.com;  #域名        location / {                # First attempt to serve request as file, then# as directory, then fall back to displaying a 404.                $uri$uri/ =404;                # Uncomment to enable naxsi on this location# include /etc/nginx/naxsi.rules        }}
3.修改nginx.conf文件,在http段下添加刚才的路径,例include /etc/nginx/conf.d/vhosts_conf/*.conf;4.将网页文件放到刚配置的路径中
cp -r 文件源路径 /usr/share/nginx/wlj
5.重新加载nginx的配置文件
    service nginx reload

3. Visit the site

例: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); }); });

    The above describes the Linux configuration webserver simple steps, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.