- Posts: 227
- Thank you received: 36
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
hosting limesurvey: subdomain vs subdirectory
- first
- Topic Author
- Offline
- Elite Member
Less
More
8 years 1 week ago - 8 years 1 week ago #134680
by first
Survey Designer and Programmer
hosting limesurvey: subdomain vs subdirectory was created by first
Please advise on hosting LimeSurvey . Should I host it at sub-domain or at sub-directory?
Sub-domain: www.limesurvey.example.com
Sub-directory: www.example.com/limesurvey/
#Best practice
#Things to consider
#Your preference.
Sub-domain: www.limesurvey.example.com
Sub-directory: www.example.com/limesurvey/
#Best practice
#Things to consider
#Your preference.
Survey Designer and Programmer
Last edit: 8 years 1 week ago by DenisChenu. Reason: Always use example.com/org for example link
The topic has been locked.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11645
- Thank you received: 2738
8 years 1 week ago #134684
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic hosting limesurvey: subdomain vs subdirectory
I think there is no right or wrong here. It only depends on how you like to organize your server.
On my server I actually use both methods. I have a subdomain for surveys in general, then under that I have different versions of LImesurvey installed in different subfolders. But this makes the URL longer (so i try to keep the subfolder names as short and simple as possible - not more than 2 digits).
But I think this is really up to personal preference.
What you should keep in mind though if you use SSL certificates: The cheaper ones are based on domains. So when you install under a subdomain, you need two of those certificates if you want to use them for your Domain AND your subdomain, if you don't have a wild card certificate (usually more expensive).
On my server I actually use both methods. I have a subdomain for surveys in general, then under that I have different versions of LImesurvey installed in different subfolders. But this makes the URL longer (so i try to keep the subfolder names as short and simple as possible - not more than 2 digits).
But I think this is really up to personal preference.
What you should keep in mind though if you use SSL certificates: The cheaper ones are based on domains. So when you install under a subdomain, you need two of those certificates if you want to use them for your Domain AND your subdomain, if you don't have a wild card certificate (usually more expensive).
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: first
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
8 years 1 week ago #134693
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic hosting limesurvey: subdomain vs subdirectory
Another think: remin of the Iframe :
If you want bto include iframe from limesurvey in you websoite : use sub-directory.
I personnaly prefer sub domain. But same installation can be in a subdomain + sub directory.
Denis
PS : Use example.org/com for example link . I don't bthink your earn money by 1and1.
If you want bto include iframe from limesurvey in you websoite : use sub-directory.
I personnaly prefer sub domain. But same installation can be in a subdomain + sub directory.
Denis
PS : Use example.org/com for example link . I don't bthink your earn money by 1and1.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
8 years 1 week ago - 8 years 1 week ago #134695
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic hosting limesurvey: subdomain vs subdirectory
I personally prefer subdomain use but mainly for the possibility to set a general htaccess for the entire subdomain for SEO & desindexation purposes (maybe GG &co understand better that you refused access to bots for a subdomain rather than a site subsection....but it's not sure)
BTW the 2 approaches are so closed that, for more reversibility, you can perfectly install LS as a subdirectory, set a subdomain pointing to this folder and use a server side rule (htaccess) to redirect example.org/LS to ls.example.org.
Another point to consider is the management of SSL certificates... Could be easier if subdirectory.
If someone have some experience about this point, please advise
For whom interested, there is also a third possibility to consider in some cases (e.g. assessment platforms):
Installing LS as the main domain and moving all other content (cms or static files) in a subdirectory.
That's what implemented here with few integration extra work where LS is the main CMS even if the site home page redirect to /en/ directory where I reinclude a (dynamic) slightly modified survey list linking to PubMed (only needs small changes in list.php file)
BTW the 2 approaches are so closed that, for more reversibility, you can perfectly install LS as a subdirectory, set a subdomain pointing to this folder and use a server side rule (htaccess) to redirect example.org/LS to ls.example.org.
Code:
Redirect 301 /LS http://ls.example.org
Another point to consider is the management of SSL certificates... Could be easier if subdirectory.
If someone have some experience about this point, please advise
For whom interested, there is also a third possibility to consider in some cases (e.g. assessment platforms):
Installing LS as the main domain and moving all other content (cms or static files) in a subdirectory.
That's what implemented here with few integration extra work where LS is the main CMS even if the site home page redirect to /en/ directory where I reinclude a (dynamic) slightly modified survey list linking to PubMed (only needs small changes in list.php file)
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 8 years 1 week ago by Ben_V.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
8 years 1 week ago #134696
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic hosting limesurvey: subdomain vs subdirectory
It might be no longer an issue on LS. But when using subdomain you always have separate cookie sessions, with subdirectory there was one cookie session. You have to set a different cookie/session name in the limesurvey config to separate cookie/session.holch wrote: On my server I actually use both methods.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: Ben_V
The topic has been locked.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11645
- Thank you received: 2738
8 years 1 week ago #134699
by holch
This is interesting. I never ran into problems here, because usually I would only use one of the installations at a time (one is for production, one is for test, etc.), but who runs two installations for production at the same time, this might be (or might have been) an issue.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic hosting limesurvey: subdomain vs subdirectory
jelo wrote: It might be no longer an issue on LS. But when using subdomain you always have separate cookie sessions, with subdirectory there was one cookie session. You have to set a different cookie/session name in the limesurvey config to separate cookie/session.
This is interesting. I never ran into problems here, because usually I would only use one of the installations at a time (one is for production, one is for test, etc.), but who runs two installations for production at the same time, this might be (or might have been) an issue.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
8 years 5 days ago - 8 years 5 days ago #134742
by Ben_V
This reminds me an easily conf doable with subdomains & domains (not tried with subdirectories):
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic hosting limesurvey: subdomain vs subdirectory
jelo wrote: You have to set a different cookie/session name in the limesurvey config to separate cookie/session.
This reminds me an easily conf doable with subdomains & domains (not tried with subdirectories):
- Several databases (1 dedicated db for each subdomain)
- Just 1 install (better for maintenance) setting db credentials condionnals to the subdomain name...
Code:
if (strpos($_SERVER['REQUEST_URI'], "subdomain1") !== false){ return array( 'components' => array( 'db' => array( 'connectionString' => 'mysql:host=localhost;port=3306;dbname=sd1;', 'emulatePrepare' => true, 'username' => 'XXX', 'password' => '123', 'charset' => 'utf8', 'tablePrefix' => 'lime_', /* . . . . . . . . . . . . . . . . . . */ } else { return array( 'components' => array( 'db' => array( 'connectionString' => 'mysql:host=localhost;port=3306;dbname=db2;', 'emulatePrepare' => true, 'username' => 'XXX', 'password' => '123', 'charset' => 'utf8', 'tablePrefix' => 'lime_', /* . . . . . . . . . . . . . . . . . . */
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 8 years 5 days ago by Ben_V.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
8 years 4 days ago #134795
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic hosting limesurvey: subdomain vs subdirectory
Remind to update too : upload directory : else files from one survey can be for another survey in another isntallation.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Ben_V
The topic has been locked.