Nginx Custom Site Directory and simple to write development Web content explained

Source: Internet
Author: User

650) this.width=650; "Width=" "height=" 427 "title=" 33.jpg "style=" WIDTH:700PX;HEIGHT:427PX; "alt=" Wkiom1myahzsq0ydaad6mi0rsfu054.jpg "src=" https://s5.51cto.com/wyfs02/M02/00/2C/ Wkiom1myahzsq0ydaad6mi0rsfu054.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "/>

650) this.width=650; "Width=" "height=" 363 "title=" 34.jpg "style=" width:700px;height:363px; "alt=" wkiom1myfz_ Isbp-aab0qe3cukc904.jpg "src=" https://s2.51cto.com/wyfs02/M02/00/2D/wKiom1mYFZ_isbP-AAB0Qe3CuKc904.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "/>

650) this.width=650; "Width=" "height=" 511 "title=" 35.jpg "style=" width:700px;height:511px; "alt=" Wkiol1myfzzwochmaabvqahtmaa675.jpg "src=" https://s1.51cto.com/wyfs02/M01/9E/DD/ Wkiol1myfzzwochmaabvqahtmaa675.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "/>

650) this.width=650; "Width=" "height=" 522 "title=" 36.jpg "style=" width:700px;height:522px; "alt=" Wkiom1myfaohjfnxaadmuqfrdqy273.jpg "src=" https://s4.51cto.com/wyfs02/M00/00/2D/ Wkiom1myfaohjfnxaadmuqfrdqy273.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "/>

[Email protected] conf]# egrep-v "^$|#" Nginx.conf.default >nginx.conf
[Email protected] conf]# pwd
/application/nginx/conf

[[email protected] conf]# vim nginx.conf  1 worker_processes  1;   2 events {  3     worker_connections  1024;   4 }  5 http {  6     include        mime.types;  7     default_type   application/octet-stream;  8     sendfile         on;  9     keepalive_timeout  65; 10      server { 11          listen       80; 12          server_name  localhost; 13         location  / { 14 &nBsp;           root   html; 15              index  index.html  index.htm; 16         } 17          error_page   500 502 503 504  / 50x.html; 18         location = /50x.html {  19             root    html; 20         } 21     }  22 }

Change the 12th line to read as follows:

server_name www.etiantian.org;

Graceful restart/application/nginx/sbin/nginx-s Reload

[Email protected] conf]#/application/nginx/sbin/nginx-tnginx:the configuration file/application/nginx-1.6.3//conf /nginx.conf syntax is oknginx:configuration file/application/nginx-1.6.3//conf/nginx.conf test is Successful[[email Protected] conf]#/application/nginx/sbin/nginx-s Reload
[[email protected] conf]# cd/application/nginx/html/[[email protected] html]# ls50x.html index.html[[email protected] H tml]# rm-f index.html

To edit the index.html file, enter the following:

[Email protected] html]# vim index.html

Then upload a picture of gongli.jpg to the current directory (the image is in the attachment below). Rz-y return to upload


Finally open the URL by opening the Windows IE input address http://10.0.0.8/. Home Site Deployment succeeded.

650) this.width=650; "Width=" "height=" 391 "title=" 39.jpg "style=" width:700px;height:391px; "alt=" Wkiol1myfqjwvjckaajsriuplnw576.jpg "src=" https://s3.51cto.com/wyfs02/M02/9E/DD/ Wkiol1myfqjwvjckaajsriuplnw576.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "/>

Open a Windows C:\Windows\System32\drivers\etc\hosts file to add local DNS resolution

10.0.0.8 www.etiantian.org

CMD ping www.etiantian.org View resolution is not 10.0.0.8IP address, if it is directly in IE open the URL www.etiantian.org can.

C:\users\administrator>ping www.etiantian.org is pinging www.etiantian.org [10.0.0.8] has 32 bytes of data: Reply from 10.0.0.8: byte = 32 o'clock Room <1ms ttl=64 from 10.0.0.8: bytes =32 time <1ms ttl=64 reply from 10.0.0.8: bytes =32 time <1ms ttl=64 reply from 10.0.0.8: bytes =32 Time < Ping statistics for 1ms ttl=6410.0.0.8: packet: Sent = 4, received = 4, lost = 0 (0% missing), estimated time of round trip (in milliseconds): shortest = 0ms, longest = 0ms, average = 0ms

650) this.width=650; "Width=" "height=" "title=" 40.jpg "style=" width:700px;height:500px; "src=" https:// S4.51cto.com/wyfs02/m00/9e/dd/wkiol1mygwntm8laaaiobkceclc592.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "alt=" Wkiol1mygwntm8laaaiobkceclc592.jpg "/>


This article is from the "Sandshell" blog, make sure to keep this source http://sandshell.blog.51cto.com/9055959/1957666

Nginx Custom Site Directory and simple to write development Web content explained

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.