I want to redirect all versions of the domain (www.surf-anonymous.info and http://surf-anonymous.info) to https://surf-anonymous.info/ . I have Ubuntu 12.04 and nginx 1.4.4. How do I do this from inside ispconfig3? I had solved the problem of redirection manually (see http://www.howtoforge.com/forums/showthread.php?p=308002#post308002) I just realized that my changes are canceled, so the redirection to https does not work any more. I assume this happened after I went to ispconfig Web Domain -> Options and set [Use Socket For PHP-FPM] to YES. So is there a way to make the redirection correctly from inside ispconfig? +++ I was preparing to follow this guide to optimize the server: http://www.howtoforge.com/configuri...x-nginx-mysql-php-fpm-for-maximum-performance But I started wondering if any of these changes (like the various caches) can be done from inside ispconfig and I might mess things up. Are they?
Use something like this in the nginx Directives field in ISPConfig: Code: if ($scheme != "https") { rewrite ^ https://www.yourdomain.tld$request_uri? permanent; }
I did and now it takes me to : https://www.yourdomain.tld/ I know, I know, I forgot to put MY DOMAIN name. So I erased it and I put: Code: if ($scheme != "https") { rewrite ^ https://www.surf-anonymous.info$request_uri? permanent; } It still takes me to https://www.yourdomain.tld/ . Obviously this is written somewhere and I cannot remove it.
The config is written once a minute, so you have to wait a minute. and such redirects are cached by the web browser. so close your browser and open it again.
The redirection to https works perfectly now. So should I follow this guide to optimize the server? How can I know there are no fuctions that are done easier from inside ispconfig3? And that later ispconfig3 will not overwrite my manual changes? http://www.howtoforge.com/configuri...x-nginx-mysql-php-fpm-for-maximum-performance
The changes in the nginx.conf file and the mysql my.cnf file will not get overwritten by ispconfig. For the changes in the php-fpm configuration and the nginx vhost files, edit the configuration file templates in /usr/local/ispconfig/server/conf/. The modified versions of the files in /usr/local/ispconfig/server/conf/ have to be saved in /usr/local/ispconfig/server/conf-custom/