Advertisement
Skilly

400 The plain HTTP request was sent to HTTPS port

Apr 18th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name paperwork.example.com;
  4. return 301 https://$server_name$request_uri;
  5.  
  6.  
  7.  
  8. }
  9.  
  10.  
  11. server {
  12. listen 127.0.0.1:9445 ssl http2 proxy_protocol;
  13. server_name paperwork.example.com;
  14. index index.php index.html index.htm;
  15.  
  16. location / {
  17. try_files $uri $uri/ /index.php;
  18. }
  19.  
  20. error_page 404 /404.html;
  21.  
  22. error_page 500 502 503 504 /50x.html;
  23. location = /50x.html {
  24. root /usr/share/nginx/www;
  25. }
  26.  
  27. # pass the PHP scripts to FastCGI server listening on the php-fpm socket
  28. location ~ \.php$ {
  29. try_files $uri =404;
  30. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  31. fastcgi_index index.php;
  32. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name ;
  33. include fastcgi_params;
  34.  
  35. }
  36.  
  37. root /var/www/paperwork/frontend/public;
  38.  
  39. ssl on;
  40. ssl_certificate /home/me/example.com.ssl/bundle.crt;
  41. ssl_certificate_key /home/me/example.com.ssl/example.com.key;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement