我正在寻找这个组合的好解决方案,并在遵循这些后:
他们似乎都没有为我工作......所以我开始尝试:
配置SSL,CloudFlare等后....
这是我试过的:
server {
listen 80;
server_name mysuperdomain.com www.mysuperdomain.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
# listen 80 deferred; # for Linux
# listen 80 accept_filter=httpready; # for FreeBSD
listen 443;
# The host name to respond to
server_name mysuperdomain.com *.mysuperdomain.com;
# Path for static files
root /sites/mysuperdomain.com/public;
ssl on;
ssl_certificate /etc/nginx/ssl/ssl.pem;
ssl_certificate_key /etc/nginx/ssl/ssl.key;
# Try static files first, then php
index index.html index.htm index.php;
# Specific logs for this vhost
access_log /sites/mysuperdomain.com/log/log-access.log; …Run Code Online (Sandbox Code Playgroud)