config nginx to run php in sub folder -


i'm installing limesurvey on server.

due nginx used proxy golang server on machine, have keep php running in sub folder.

the root dirctory of limesurvey on disk /limesurvey.

so have nginx config below:

location /limesurvey {     alias    /limesurvey; } location ~ /limesurvey/.*\.php$ {     alias /limesurvey;     fastcgi_pass 127.0.0.1:9000;     fastcgi_param script_filename /$fastcgi_script_name;     include fastcgi_params; } location / {     proxy_pass http://127.0.0.1:8080; } 

but when visit http://example.com/limesurvey/index.php, shows:

  opendir(/limesurvey/limesurvey/tmp/assets/1086beef): failed open dir: no such file or directory 

what want archive is: http://example.com/limesurvey/* goes local file system (/limesurvey/*)

all other query goes 127.0.0.1:8080

how can config nginx fix issue?

location ~ /limesurvey/.*\.php(.*)$ { access_log /1.logs;     root /lms/;     fastcgi_pass 127.0.0.1:9000;     fastcgi_param script_filename /lms$fastcgi_script_name;     include fastcgi_params; } location /limesurvey {   root   /lms/; } 

and move /limesurvey folder /lms/limesurvey folder


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -