Mobile app version of vmapp.org
Login or Join
Pierce454

: Issue with SSL and Nignx www rewrite (WPMU) (mostly working) Welcome everyone, thank you for viewing my thread. It appears due to my lack of reputation I am unable to post more than 2 links.

@Pierce454

Posted in: #Nginx #NoWww #Wordpress

Welcome everyone, thank you for viewing my thread. It appears due to my lack of reputation I am unable to post more than 2 links. This post would be a nightmare for the reader to view without links thus I will post a single pastebin link with my issue.

Overview:

I have a WordPress MutliSite server which utilizes CloudFlare SSL.

I have Nginx setup to return non-www to This works; perhaps not fully.
I have CloudFlare SSL established and working on each website of the MultiSite.

WordPress sites are mapped and setup as: www.example.com
two.com goes to www.two.com one.com goes to www.one.com one.com goes to www.one.com

The issue:


two.com goes to www.one.com

If the URL to a subsite does not include www it returns the root site.



NGINX:

server {
listen 80;
server_name one.com two.com;
return 301 $scheme://www.$server_name$request_uri;
}

server {
listen 80;
server_name one.com two.com; root /var/www/one.com;
index index.php index.html;
}




CloudFlare Page Rules (separate sites):
*one.com/* Always Use HTTPS
*two.com/* Always Use HTTPS


The short and sweet:
Everything is working other than non-www links to sub-sites.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Pierce454

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme