| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- server {
- server_name twongd.shotshock.shop;
- root /var/www/twong/public;
- index index.php index.html;
- location ^~ /mobilex/ {
- alias /var/www/twong/public/mobilex/;
- }
- location / {
- if (!-e $request_filename) {
- rewrite ^(.*)$ /index.php?s=$1 last;
- break;
- }
- }
- location ~ \.php {
- include fastcgi.conf;
- fastcgi_pass unix:/run/php/php7.2-fpm.sock;
- }
- listen 443 ssl; # managed by Certbot
- ssl_certificate /etc/letsencrypt/live/twong.shotshock.shop/fullchain.pem; # managed by Certbot
- ssl_certificate_key /etc/letsencrypt/live/twong.shotshock.shop/privkey.pem; # managed by Certbot
- include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
- ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
- }
- # 转向 https
- server {
- if ($host = twongd.shotshock.shop) {
- return 301 https://$host$request_uri;
- } # managed by Certbot
- listen 80;
-
- server_name twongd.shotshock.shop;
- return 404; # managed by Certbot
- }
|