Could someone with nginx experience take a look at my config and tell me if
it works? I can't really test it in-house so I'm hoping someone has done
something similar.
Right now, I have two server blocks:
One to redirect example.com to www.example.com
server {
listen 443;
server_name example.com;
return 301 https://www.example.com$request_uri;
}
And another as the default server (for www.example.com)
server {
listen 443 default_server ssl;
}
I would really like to collapse that into one server block, something like
this:
server {
listen 443 ssl;
server_name example.com;
return 301 https://www.example.com$request_uri;
}
Is this the proper way to do this? Or should I just stick with the way I
have it now? This is a working, production configuration, in case anyone is
curious. I've googled articles that suggest this is the way to do it, but
can't truly test it in-house.
Any thoughts would be appreciated.
--
Mark Haney ::: Senior Systems Engineer
*VIF* International Education
P.O. Box 3566 ::: Chapel Hill, N.C. 27515 ::: USA
919-265-5006 office
Global learning for all.
www.vifprogram.com
<http://www.vifprogram.com/?utm_source=signature&utm_medium=email&utm_campaign=VIF>
Find VIF on Facebook <http://facebook.com/VIFInternationalEducation> |
Twitter <https://twitter.com/vifglobaled> | LinkedIn
<http://www.linkedin.com/company/vif-international-education>
Recognized as a ‘Best for the World’
<http://bestfortheworld.bcorporation.net/> B Corp!
--
users mailing list
[email protected]
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org