Subdomain installation & Fake HSTS (301/302 Redirects) [Highly Experimental!] #449
Locked
LordRalex
announced in
Legacy - Templates and Modifications
Replies: 2 comments
-
Voigon wrote at Dec 24 2016 07:34:31 UTC: can you make one for apache2 please? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hwiggy wrote at Dec 24 2016 07:34:31 UTC: Sorry, Voigon, it would not be wise to ask me for a safe way to do this on Apache2 because I am always horrible at scripting; for instance, this specific NGINX code will cache everything on the server for 20 minutes, so your production users won't be able to see changes until the cache expires. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hwiggy wrote at Dec 24 2016 07:34:31 UTC:
I do not condone using this for a professional instance because I have no intention of making sure it works safely not flawlessly - I also wrote this at 02:30 in the morning so I can guarantee I said / spelled / explained something in a horrible manner
Make sure you take backups of whatever I tell you to edit before you edit them, because I usually only get lucky with the things I configure and have a tendency to break them.
I'm not even going to bother explaining why I wanted to do this. Before you do this, make sure you understand the difference between a 301 or 302 redirect (No they are not the same).
This is confirmed working on Ubuntu 15.10. Here is my pufferpanel.conf without personal info like my domain name. (/etc/nginx/sites-enabled/pufferpanel.conf)
I just have to note that the way this pasted is horrible and probably should only be used for reference and not as a direct copy sort of thing simply because of the lack of formatted whitespace in the paste. Practically the way this works is I set a default server to the panel installation domain and then set fake HSTS on it so it worked with the legitimate 443 listener. I have not discovered any breakages in the system yet, but I'm sure I will find one.
This might cause problems in future versions of Pufferpanel, but the devs can feel free to comment in the replies to this thread if this is an unsafe thing to do.
Beta Was this translation helpful? Give feedback.
All reactions