Koozali.org: home of the SME Server
Obsolete Releases => SME 9.x Contribs => Topic started by: calisun on April 16, 2018, 12:45:07 AM
-
I want to force domains to go to https, as per suggestion in this post
https://forums.contribs.org/index.php/topic,53045.15.html (https://forums.contribs.org/index.php/topic,53045.15.html)
smeserver-webapps-common is a better option over creating a template.
After installing the contrib, I have issued following command:
db domains setprop MyDomain.com TemplatePath WebAppVirtualHost RequireSSL enabled
So now when I go to MyDomain, it is forcing HTTPS, but at the same time, it has changed the location of iBay from MyDomain-iBay to Primary iBay. I have several domains and they all point to different iBays. So basically this contrib rendered Server-Manager Domains option useless as right now any iBay I point to has no effect as it constantly points to Primary iBay.
-
see https://bugs.contribs.org/show_bug.cgi?id=10282
the behaviour you ask is the default since 2014.
if it is not working this way, it is mostly because you have a template-custom hidding the fragment /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent
try
ll /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/
-
I want to force domains to go to https, as per suggestion in this post
https://forums.contribs.org/index.php/topic,53045.15.html (https://forums.contribs.org/index.php/topic,53045.15.html)
smeserver-webapps-common is a better option over creating a template.
After installing the contrib, I have issued following command:
db domains setprop MyDomain.com TemplatePath WebAppVirtualHost RequireSSL enabled
So now when I go to MyDomain, it is forcing HTTPS, but at the same time, it has changed the location of iBay from MyDomain-iBay to Primary iBay. I have several domains and they all point to different iBays. So basically this contrib rendered Server-Manager Domains option useless as right now any iBay I point to has no effect as it constantly points to Primary iBay.
this is because you did not specified "DocumentRoot" as needed by /etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content fragment, so it default to Primary ibay.
anyway you do not need this works as stock SME should offer you the redirection to https. See my previous answer.
-
Thank you Jean-Philippe Pialasse for your help.
I have uninstalled smeserver-webapps-common,
now how do I revert the domain iBay to be controlled by Server-Manager? No matter what I change domain iBay to be, it still points to Primary.
-
the behaviour you ask is the default since 2014.
if it is not working this way, it is mostly because you have a template-custom hidding the fragment /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/20IbayContent
You are correct, I had a template from How-To I have created back in 2013;
https://wiki.contribs.org/Wordpress_Multisite
I have just updated the How-To with updated code.
I just need help with question from my earlier post.
-
You are correct, I had a template from How-To I have created back in 2013;
https://wiki.contribs.org/Wordpress_Multisite
I have just updated the How-To with updated code.
I just need help with question from my earlier post.
db domains delprop MyDomain.com TemplatePath
db domains delprop MyDomain2.com TemplatePath
db domains delprop MyDomain3.com TemplatePath
expand-template /etc/httpd/e-smith
service httpd-e-smith restart
-
by the way,
what is needed exactly in your modified fragment ?
why wordpress in an ibay?
setting up using the contrib and a modified template including wildcard domainv for a virtualhost would be a better approach and pretty easy
-
by the way,
what is needed exactly in your modified fragment ?
found
@@ -34,7 +34,7 @@
. "enabled\n"
. " # /sbin/e-smith/signal-event console-save\n";
}
- $OUT .= " Alias /files $basedir/files\n";
+ $OUT .= " # Alias /files $basedir/files\n";
if (($domains->get_prop($virtualHost, 'SystemPrimaryDomain') || 'no')
eq 'yes')
I would suggest rather to
cd /home/e-smith/files/ibays/$ibay/html
shopt -s dotglob nullglob
mv files/* ../files/
rmdir files
ln -s ../files
and set apache to allow followsymlinks, which you already did.
-
db domains delprop MyDomain.com TemplatePath
db domains delprop MyDomain2.com TemplatePath
db domains delprop MyDomain3.com TemplatePath
expand-template /etc/httpd/e-smith
service httpd-e-smith restart
I am getting an error message:
# expand-template /etc/httpd/e-smith
ERROR: No templates were found for /etc/httpd/e-smith.
at /sbin/e-smith/expand-template line 45
-
"expand-template /etc/httpd/e-smith"
Not sure there is such a template "/etc/httpd/e-smith" to expand, hence the error message.
I'd expect something like /etc/httpd/conf/httpd.conf or or /etc/httpd/admin-conf/httpd.conf from looking at the templates directory and searching the wiki.
-
"expand-template /etc/httpd/e-smith"
Not sure there is such a template "/etc/httpd/e-smith" to expand, hence the error message.
I'd expect something like /etc/httpd/conf/httpd.conf or or /etc/httpd/admin-conf/httpd.conf from looking at the templates directory and searching the wiki.
Thank you for the correction
Did not double checked my writting, this is indeed
expand-template /etc/httpd/conf/httpd.conf
-
Worked like a charm, thank you for all you help.
(https://www.askideas.com/media/11/You-Rock-Spongebob-Picture.gif)