[nginx]安装配置(ubuntu/windows)

/ 43评论 / 1996阅读 / 2点赞

nginx

这是一个使用c发高性能免费开源软件,被用于网络中的负载均衡,端口转发,反向代理等。

我常用它来监听80端口中的http请求,通过判断这些http请求的域名,


ubuntu环境


下载安装nginx


编写server配置文件

直接由nginx提供服务

server {
        listen       80;                  #监听端口
        server_name  www.coolight.cool;   #域名
        #-------nginx----------
        location / {                      #链接的后半部分为空时
           root /home/0Acoolight/nginx/root;  #访问的文件所在目录
           index index.html index.htm;        #访问的文件名
        }

        location /hello {
           root /home/0Acoolight/nginx/root/hello;  #访问的文件所在目录
           index index.html index.htm;        #访问的文件名
        }
}

nginx提供php服务


nginx转发给其他端口

server {
        listen       80;
        server_name  tomcat.coolight.cool;
        #-------Tomcat---------
        location / {
            proxy_pass  http://localhost:8080/;

            proxy_set_header        Host            $host;
            proxy_set_header        X-Real-IP       $remote_addr;
            proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
            
            client_max_body_size 10m;
            client_body_buffer_size 128k;
            proxy_connect_timeout 90;
            proxy_send_timeout 90;
            proxy_read_timeout 90;
            proxy_buffer_size 4k;
            proxy_buffers 4 32k;
            proxy_busy_buffers_size 64k;
            proxy_temp_file_write_size 64k;
        }
}

Win环境

下载安装nginx

server {
        listen       80;
        server_name  tomcat.coolight.cool;
        #-------Tomcat---------
        location / {
            proxy_pass  http://localhost:8080;
            proxy_set_header        Host            $host;
            proxy_set_header        X-Real-IP       $remote_addr;
            proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 10m;
            client_body_buffer_size 128k;
            proxy_connect_timeout 90;
            proxy_send_timeout 90;
            proxy_read_timeout 90;
            proxy_buffer_size 4k;
            proxy_buffers 4 32k;
            proxy_busy_buffers_size 64k;
            proxy_temp_file_write_size 64k;
        }
}

常用命令


常见问题

  1. Scottvaw说道:

    Brands that manufacture chronometer watches
    Understanding COSC Validation and Its Importance in Horology
    COSC Accreditation and its Stringent Standards
    COSC, or the Official Swiss Chronometer Testing Agency, is the official Swiss testing agency that attests to the accuracy and accuracy of timepieces. COSC accreditation is a sign of superior craftsmanship and dependability in timekeeping. Not all watch brands pursue COSC validation, such as Hublot, which instead adheres to its proprietary demanding standards with movements like the UNICO, achieving equivalent accuracy.

    The Science of Precision Timekeeping
    The core mechanism of a mechanized timepiece involves the spring, which delivers energy as it unwinds. This system, however, can be susceptible to external factors that may affect its precision. COSC-certified movements undergo rigorous testing—over fifteen days in various circumstances (five positions, three temperatures)—to ensure their durability and dependability. The tests evaluate:

    Mean daily rate precision between -4 and +6 seconds.
    Mean variation, peak variation rates, and effects of temperature changes.
    Why COSC Certification Matters
    For timepiece aficionados and connoisseurs, a COSC-certified watch isn’t just a piece of technology but a testament to enduring excellence and precision. It symbolizes a timepiece that:

    Presents outstanding reliability and precision.
    Ensures guarantee of quality across the entire construction of the watch.
    Is likely to retain its value more efficiently, making it a smart investment.
    Famous Chronometer Manufacturers
    Several renowned brands prioritize COSC validation for their watches, including Rolex, Omega, Breitling, and Longines, among others. Longines, for instance, offers collections like the Record and Soul, which feature COSC-validated movements equipped with advanced materials like silicone balance suspensions to improve resilience and efficiency.

    Historic Context and the Evolution of Chronometers
    The notion of the chronometer dates back to the requirement for exact chronometry for navigational at sea, emphasized by John Harrison’s work in the 18th century. Since the official establishment of COSC in 1973, the validation has become a benchmark for evaluating the precision of luxury watches, continuing a tradition of excellence in horology.

    Conclusion
    Owning a COSC-certified watch is more than an aesthetic selection; it’s a commitment to excellence and precision. For those appreciating accuracy above all, the COSC accreditation offers peacefulness of mind, guaranteeing that each validated watch will function dependably under various circumstances. Whether for individual satisfaction or as an investment, COSC-accredited watches distinguish themselves in the world of horology, bearing on a legacy of careful timekeeping.

  2. LarryGok说道:

    PBN sites
    We build a system of private blog network sites!

    Benefits of our privately-owned blog network:

    We execute everything SO THAT google does not comprehend that THIS IS A private blog network!!!

    1- We acquire web domains from distinct registrars

    2- The main site is hosted on a virtual private server (VPS is high-speed hosting)

    3- Other sites are on distinct hostings

    4- We designate a unique Google account to each site with verification in Google Search Console.

    5- We make websites on WP, we do not utilise plugins with assisted by which malware penetrate and through which pages on your websites are produced.

    6- We never duplicate templates and utilise only distinct text and pictures

    We never work with website design; the client, if wished, can then edit the websites to suit his wishes

  3. dobry sklep说道:

    Wow, wonderful weblog layout! How long have you been running a blog for?
    you make running a blog glance easy. The whole look of your website is magnificent, as
    smartly as the content material! You can see similar here e-commerce

  4. sklep说道:

    Wow, marvelous weblog structure! How long have you been blogging for?
    you made running a blog look easy. The total glance of your website is great, as smartly as the content material!

    You can see similar here sklep internetowy

  5. hitman.agency说道:

    Hey there! Do you know if they make any plugins to help with Search Engine
    Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m
    not seeing very good gains. If you know of any please share.
    Thanks! You can read similar art here: Scrapebox AA List

  6. najlepszy sklep说道:

    Howdy! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m
    not seeing very good gains. If you know of any please share.
    Kudos! You can read similar art here: Dobry sklep

  7. dobry sklep说道:

    Wow, awesome blog structure! How lengthy have you been blogging for?
    you make running a blog look easy. The overall glance of your site is wonderful,
    let alone the content! You can see similar here sklep internetowy

  8. Rastrear Celular说道:

    Existe uma maneira melhor de localizar rapidamente um telefone celular sem ser descoberto por ele?

  9. GIwElmkV说道:

    levitra montelukast and fexofenadine hydrochloride uses in hindi The theory is that equity prices can be considered as a discounted price of future dividends buy cialis 5mg online

  10. bYWktDdjZ说道:

    Klaveniek, G when to take viagra for best results Nonalcoholic liver disease nonalcoholic steatohepatitis, NASH

  11. zSuAshNtO说道:

    Testicles Testicular neoplasia is rare in cats when to take viagra Ablation characteristics are summarized in Table 2

  12. jxoDBPP说道:

    propecia walgreens In 1969, a miner who was suffering from a disease known as Black Lung, which leads to death, was suggested by friends to stop working

  13. MWrQIPqop说道:

    Since the operation also removes the cord above the testicle, that side of the scrotum can look and feel empty to them viagra with alcohol Gemcitabine generally is accepted as an agent with a favourable toxicity profile 21

  14. JWFGVCwx说道:

    During the first few days after birth, the red cells have a normal or high content of GSH 5 mg cialis generic india

  15. Assumpmok说道:

    how much is viagra at walmart Myth 6 is the politically correct myth, Dr

  16. Assumpmok说道:

    Cancer has spread to other parts of the body beyond the pelvis, including the abdomen and or lymph nodes in the groin cialis online reviews

  17. escanty说道:

    The munich doctors have previously 2000, 2003 published studies showing an improved pregnancy rate 43 compared to 20 where 300mcg of molgramostin GM- CSF was given as a single dose injection on the day of ET, but I haven t been able to get a free copy of the full journal articles online finasteride

  18. Assumpmok说道:

    1990 May 27; 131 21 1147 50 online cialis

  19. escanty说道:

    Antibiotics are sort of vegan, sort of not vegan, but ultimately something a vegan shouldn t stress about or feel guilty about taking for various reasons is generic viagra safe vivax cases that would have been observed in the prophylactic phase would also have relapsed in the absence of post exposure prophylaxis

  20. Ambibrile说道:

    Dual agent chemoprotection by retroviral co expression of either MDR1 or MRP1 with the P140K mutant of O6 methylguanine DNA methyl transferase buying cialis online safely I did have really bad acne as a teenager and I had to take accutane twice but my adult acne hasn t been THIS bad

  21. THATHECOM说道:

    Thus creatinine clearance rate CCR defined as the volume of blood cleared of creatinine per minute closely approximates the GFR and is commonly used as a measure of GFR, which is more difficult to directly measure generic for cialis

  22. embeway说道:

    Sullivan SM et al cialis 5 mg best price usa 19, 20 A number of trials have directly evaluated the efficacy of OA OS strategies versus CMF cyclophosphamide, methotrexate, and fluorouracil chemotherapy for premenopausal women

  23. grenuenah说道:

    Half of the patients in the control group had a BNP drawn on day one, so although they didn t have the multiple BNP protocol, there may not have been much difference in the management of these patients, so we probably shouldn t be too surprised that there were no differences in outcomes zithromax iv

  24. grenuenah说道:

    cialis online reviews Kayla, USA 2022 05 30 10 29 49

  25. Coikemn说道:

    Heart failure is called congestive heart failure when fluid builds up in various parts of the body cialis from india

  26. VORVOSESK说道:

    Derick TewRYvwpuP 6 20 2022 where to buy cialis Although patients are often jaundiced, they enjoy normal life expectancies

  27. Injeway说道:

    cheapest cialis 20mg 1 307 1 271 1 250 1 200 1 200 1 188 1 187 1 122 1 122 1 122 1 113 1 109 1 056 1 030 1 000 1 000 89 000 10 000 6 000 5 547

  28. VORVOSESK说道:

    After subgroup analysis and sensitivity analysis, we found that Cristofanilli s research may cause heterogeneity 23 viagra nitric oxide Nondestructive determination of lignans and lignan glycosides in sesame seeds by near infrared reflectance spectroscopy

  29. VORVOSESK说道:

    ERОІ1 repressed the mesenchymal spindle shaped morphology of the MDA MB 231 and Hs578T cells and enhanced cell cell contact buy cialis 5mg This would be my first, so I don t know what to expect

  30. Injeway说道:

    In specific population such as cigarette smokers the use of ОІ carotene increases the risk of lung or prostate cancer 205, 206, 207, 212 cialis 20mg I knew about misoprostol before I miscarried specifically that it s not FDA- approved for use on pregnant women, but doctors continue to use it to induce labor, and that it often results in ruptured uteruses

  31. Great online game https://razorsharkplay.com/ where you can win money, buy your loved one a new phone or car, close the mortgage on a room and just two months, hurry up register and win.

回复 embeway 取消回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注