nginx.conf 784 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # debian 9
  2. server {
  3. listen 80;
  4. server_name 0.0.0.0;
  5. root /opt/www/twong/public
  6. index index.php index.html;
  7. location ^~ /mobilex/ {
  8. alias /opt/www/twong/public/mobilex/;
  9. }
  10. # api
  11. location / {
  12. if (!-e $request_filename){
  13. rewrite ^(.*)$ /index.php?s=$1 last;
  14. break;
  15. }
  16. }
  17. # php
  18. location ~ \.php {
  19. include fastcgi.conf;
  20. fastcgi_pass unix:/run/php/php7.2-fpm.sock;
  21. }
  22. }
  23. server {
  24. listen 443 ssl;
  25. ssl on;
  26. ssl_certificate /etc/letsenrypt/live/***;
  27. ssl_certificate_key /etc/letsencrypt/live/***;
  28. server_name *.com;
  29. server_tokens off;
  30. include /etc/letsencrypt/options-ssl-nginx.conf;
  31. location / {
  32. proxy_pass http://127.0.0.1:80;
  33. }
  34. }