1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
| lighthouse@VM-0-8-ubuntu:~$ sudo cat /etc/nginx/sites-available/queek.work
server { if ($host = www.queek.work) { return 301 https://$host$request_uri; }
if ($host = queek.work) { return 301 https://$host$request_uri; }
listen 80; server_name queek.work www.queek.work;
return 301 https://$host$request_uri; }
server { listen 443 ssl; server_name queek.work www.queek.work; ssl_certificate /etc/letsencrypt/live/queek.work/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/queek.work/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_stapling on; ssl_stapling_verify on;
ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m;
access_log /var/log/nginx/queek.work.access.log; error_log /var/log/nginx/queek.work.error.log;
location /api/ { proxy_pass http://localhost:8000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }
location /static/product_images/ { alias /home/lighthouse/workspace/muxi_shop_api2/static/product_images/; expires max; add_header Cache-Control "public"; try_files $uri $uri/ =404; }
location / { root /home/lighthouse/workspace/small_u-shopping_mall/; index index.html; try_files $uri /index.html; } location /shopmall/ { alias /home/lighthouse/workspace/small_u-shopping_mall/; index index.html; try_files $uri /index.html; } location /welcome { alias /home/lighthouse/workspace/html/; index test.html; } location /pet { alias /home/lighthouse/workspace/html/liuhuan/; index pet.html; }
} lighthouse@VM-0-8-ubuntu:~$
|