| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- # debian 9
- server {
- listen 80;
- server_name 0.0.0.0;
- root /opt/www/twong/public
- index index.php index.html;
- location ^~ /mobilex/ {
- alias /opt/www/twong/public/mobilex/;
- }
- # api
- location / {
- if (!-e $request_filename){
- rewrite ^(.*)$ /index.php?s=$1 last;
- break;
- }
- }
- # php
- location ~ \.php {
- include fastcgi.conf;
- fastcgi_pass unix:/run/php/php7.2-fpm.sock;
- }
- }
- server {
- listen 443 ssl;
- ssl on;
- ssl_certificate /etc/letsenrypt/live/***;
- ssl_certificate_key /etc/letsencrypt/live/***;
- server_name *.com;
- server_tokens off;
- include /etc/letsencrypt/options-ssl-nginx.conf;
- location / {
- proxy_pass http://127.0.0.1:80;
- }
- }
|