Guest User

Untitled

a guest
Jul 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name www.example.com example.com;
  5. rewrite ^ https://example.com$request_uri? permanent;
  6. }
  7. server {
  8. listen 80;
  9. server_name sub.example.com;
  10. location / {
  11. proxy_pass http://private_ip_address:8890;
  12. proxy_http_version 1.1;
  13. proxy_set_header Upgrade $http_upgrade;
  14. proxy_set_header Connection 'upgrade';
  15. proxy_set_header Host $host;
  16. proxy_cache_bypass $http_upgrade;
  17. }
  18. }
  19. server {
  20. listen 443;
  21. listen [::]:443 ssl http2;
  22. include /usr/local/nginx/conf/openssl.conf;
  23. server_name www.example.com;
  24. rewrite ^ https://example.com$request_uri? permanent;
  25. }
  26. server {
  27. listen 443 ssl http2;
  28. listen [::]:443 ssl http2;
  29. server_name example.com;
  30. include /usr/local/nginx/conf/openssl.conf;
  31. root /home/site/public_html;
  32. set $no_cache 0;
  33. index index.php;
  34. location / {
  35. try_files $uri $uri/ /index.php?$query_string;
  36. expires 7d;
  37. }
  38. include /usr/local/nginx/conf/wordpress.conf;
  39. include /usr/local/nginx/apps/pagespeed/optimize.conf;
  40. include /usr/local/nginx/conf/cache.conf;
  41. location ~ .php$ {
  42. include /usr/local/nginx/conf/php.conf;
  43. include /usr/local/nginx/conf/fastcgi_params;
  44. }
  45. }
Add Comment
Please, Sign In to add comment