Problem when installing in subfolder

More
3 years 6 months ago #148371 by marvelousvts
Hello all,

I have an issue when I try to start installation in a subfolder:

I have intra1.xxxxxxx.com/app/survey/ where I have copied all limesurvey files

when I execute this path then I am redirected in: intra1.xxxxxxx.com/survey/index.php?r=installer and I get 404 - File or directory not found because this folder doesn't exist of course. This folder is located under app folder and not under home.

Can you please tell me how I can stop this redirection and start the installation?
The topic has been locked.
LimeSurvey Partners
More
3 years 6 months ago #148375 by holch
I would say that you had already installed Limesurvey in that other folder before, with the same database?

Did you change the config file and switch the base url.

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.
More
3 years 6 months ago #148380 by marvelousvts
Can you please give me a sample of config.php with the base url configuration?
The topic has been locked.
More
3 years 6 months ago #148383 by DenisChenu
There are a redirection from app/survey to survey on YOUR server, not by limesurvey.

config.php don't need update to be in subfolder

Look at your server config

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.
More
3 years 6 months ago #148386 by marvelousvts
Hello DenisChenu,

I put die(); on index php and I have noticed that when is executed the last line :
Yii::createApplication('LSYii_Application', $config)->run();
only then is redirecting.
I suppose that the server configuration is correct otherwise index.php would never be executed.
The topic has been locked.
More
3 years 6 months ago #148388 by DenisChenu
I already have a lot of LS installed on subfolder's : never have issue ...

Try with
echo "<pre>";
print_r($config,1);
die("<pre>");

here : github.com/LimeSurvey/LimeSurvey/blob/master/index.php#L212

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.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
3 years 6 months ago #148390 by LouisGac
Replied by LouisGac on topic Problem when installing in subfolder
Hi marvelousvts,

Myself, I always work with LS installed in a subfolder, in a symlink, and it works perfectly fine.
So I bet your problem is not related to LimeSurvey but rather to your server configuration.
The topic has been locked.
More
3 years 6 months ago #148391 by marvelousvts
please find attached the $config
Attachments:
The topic has been locked.
More
3 years 6 months ago #148393 by DenisChenu


I can only think of an issue on your server

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.
Attachments:
The topic has been locked.
More
3 years 6 months ago #148397 by holch
As Tpartner und Denis say, installing into subfolders is totally normal and I also do it all the time. This is why I tought that you had installed Limesurvey in the root folder of the subdomain first and then moved the files to the subfolder and there was still some trace left.

config.php normally finds the URL itself.

I also think you need to check on your server if there are any redirects or anything.
I would do the following: clean the app folder completly, upload the limesurvey files completely new, make a fresh install in a fresh database and see what happens.

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.
More
3 years 6 months ago #148406 by DenisChenu

jelo wrote: ....
And I'm really pissed of that I get a URL limit protection when creating posts. This kind of SPAM-protection is demotivates me of answering posts. This now goes on for a long time. Nothing changed. As a normal user account I see no sense in the URL limit. Where is that preventing SPAM?

I have same issue : 2 url for post, but any number when edit ;)

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.
More
3 years 6 months ago #148407 by marvelousvts
I used baseUrl and HostInfo setting in config.php and initially it worked!
But when I click any button e.g. login button or for example to change language I redirect again back to folder.

Is there any additional setting that I should add in config.php in order to have all requests and assets linked to the indicated URL?
The topic has been locked.
More
3 years 6 months ago #148409 by holch
Usually you do not need to change anything in the config file. So these changes might have been the problem (if they where not only done after the problems appeared).

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: DenisChenu
The topic has been locked.
More
1 year 3 months ago - 1 year 3 months ago #183763 by lcnittl
I might jump in on that point and revive this old topic, as I am experiencing the same issues as the OP 2 years ago.
After massive experimenting I came up with a configuration that allows serving of the admin page, however with broken css. On clicking on the 'Start installation' button, the URL changed/redirected from
https://servername.com/survey/index.php?r=installer/welcome
to
https://servername.com/index.php?r=installer/welcome
. Well, already the broken interface is a hint that something is not working correctly.
File Attachment:

I was able to dirty-fix this look-issue by adding '/survey/' instead of '/' in the 'config-defaults.php' where 'publicurl' is defined (lines 621 and 623), however, the link would still give the wrong URL.

I am using the following setup:
The latest LimeSurvey release (limesurvey3.17.1+190408.zip).

An nginx reverse proxy that handles http to https redirects, and proxy passes the requests to different backend servers based on location (f.e. /survey/ to the limesurvey webserver). The backend server then proxy passes php requests to php-fpm.

The config of the frontend reverse proxy:
http{
    [..some stuff..]
 
    include /etc/nginx/proxy_params;
 
    [..some stuff..]
 
    server {
        listen 80 default_server;
        listen [::]:80 default_server;
 
        return 301 https://$host$request_uri;
    }
 
    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
 
        [..all the SSL stuff..]
 
        [..other locations..]
 
        location /survey/ {
            #include /etc/nginx/proxy_params;  # included in http context
            proxy_pass http://192.168.3.13/;
        }
    }
}

The proxy_params file:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;

The config of the limesurvey backend nginx (IP:192.168.3.13; 'snippets/fastcgi-php.conf' as of Debian9 nginx installation)
http{
    [..some stuff..]
 
    sever{
        listen 80;
        server_name _;
 
        root /var/www/html/limesurvey;
        index index.html index.htm index.php;
        charset UTF-8;
 
        try_files $uri $uri/ /index.php?r=$uri&$args;
 
        location ~ [^/]\.php(/|$) {
            include snippets/fastcgi-php.conf;
 
            # Mitigate https://httpoxy.org/ vulnerabilities
            fastcgi_param HTTP_PROXY "";
 
            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        }
    }
}

Any ideas what I am overseeing? Any help appreciated!
Last edit: 1 year 3 months ago by lcnittl.
The topic has been locked.
More
1 year 3 months ago #183770 by DenisChenu
try_files $uri $uri/ /index.php?r=$uri&$args; … is the issue …

Did you check with
try_files $uri $uri/ /survey/index.php?r=$uri&$args;

And : why did you try to fix url before installing ?

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.

Start now!

Just create your account and start using Limesurvey today.

Register now