View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
14691Bug reportsDocumentationpublic2021-01-28 14:43
Reportermarcgold Assigned ToDenisChenu  
PrioritynoneSeveritytweak 
Status assignedResolutionopen 
Product Version3.16.x 
Summary14691: Nginx Rewrite Rules
Description

Hi. Been having some issues with the rewrite and config rules for a pure Nginx server install. Noted that the current manual notes are very much out of date. The issue can be followed in the forum here https://www.limesurvey.org/forum/installation-a-update-issues/117984-plesk-onyx-server-nginx-setup?start=0

With the help of DenisChenu and Jelo, we finally settled on to following rules that work perfectly. Would appreciate that LS review these and make any suggestions to improve further. But in any event can update the documentation so that others may be helped in the future.

NGinx is definitely the way to go, even your own hosted is running this - were seeing a 300% increase in performance.

My Rule set: (these are an included within my nginx.conf due to my plesk setup so may need to be adjusted for more general use)

index index.html index.htm index.php;
try_files $uri $uri/ /index.php?r=$uri&$args;
if (!-e $requestfilename){
rewrite ^(.)$ /master/index.php;
}
location ~ ^/master/(application|docs|framework|themes/\w+/views) {
deny all;
}
location ~ ^/master/upload/surveys/.
/fu
[a-z0-9]$ {
return 444;
}
location ~ ^/master/(.
/)?.+ {
return 403;
}
location ~ /master/upload/..(pl|cgi|py|pyc|pyo|phtml|sh|lua|php|php3|php4|php5|php6|pcgi|pcgi3|pcgi4|pcgi5|pcgi6|icn)$
{
return 444;
}

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)Version 3.16.1+190314
I will donate to the project if issue is resolvedNo
BrowserN/A
Database type & versionPostgresql
Server OS (if known)Centos 7 & 6.9
Webserver software & version (if known)Nginx Pure
PHP Version7.3.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2019-03-26 18:20

developer   ~51142

I update https://manual.limesurvey.org/General_FAQ#How_can_I_remove_index.php_from_the_URL_path_to_get_a_shorter_URL , but yes : i think nginx (and IIS° need a dedicated page.
@cdorin : Maybe at https://manual.limesurvey.org/Not_categorized_and_advanced_features ? Addin a Nginx configuration ? Because enforce nginx config enforce security.

If you‘re OK , i create the page (and after put the link at General_FAQ, and remove current part)

cdorin

cdorin

2019-03-29 10:45

reporter   ~51192

Hey @DenisChenu, thank you for your work. Well, it seems people need a special section for it. Could you please create the new page in https://manual.limesurvey.org/Not_categorized_and_advanced_features ? Perhaps something like Server configuration with two subpoints: apache configuration and nginx configuration (we can add in the beginning of the new two sections that they were created by the community members and can be updated by anyone at any time if a better configuration is found). Regarding apache, we should at least mention it in there because I know there are apache fans out there :) .

The configuration should be left in General FAQ in my opinion - it's quite accessed by our visitors. Perhaps a {{Note}} should be added that for more details see section X.

@marcgold, thank you for bringing up the topic!

DenisChenu

DenisChenu

2019-03-29 11:57

developer   ~51196

The configuration should be left in General FAQ in my opinion - it's quite accessed by our visitors. Perhaps a {{Note}} should be added that for more details see section X.

It's more what i think

apache configuration and nginx configuration

apache, ngynx, IIS ;) : one page for all ? Or one page by server.

Maybe

  • Gnu/Linux
    • Directory rights
    • ???
  • Apache
    • mod_rewrite
    • Allow htaccess for virtualhost
  • Nginx
    • configuration file tips
  • IIS
    • Windows directory rights
cdorin

cdorin

2019-03-29 14:52

reporter   ~51200

Hmm, how would you find it easier to be read by the users? I would go for all the server-related information on one page.

Regarding your scheme, I agree with all of it. We can also ask on the forum (after we have the first draft) the other community members to bring their contributions.

DenisChenu

DenisChenu

2019-03-29 15:36

developer   ~51201

My personnal opinion : i want the good server settings for my apache on Linux : i prefer to have one page than a multiple page : one for security, one for url path, one for … etc …
Same for apache on windows or nginx on BSD ( 8D )

cdorin

cdorin

2019-03-29 15:54

reporter   ~51202

Indeed, if there is enough content, it makes 100% sense.

DenisChenu

DenisChenu

2021-01-28 14:43

developer   ~61733

Best place maybe : https://www.nginx.com/resources/wiki/start/topics/examples/full/

Sample : https://www.nginx.com/resources/wiki/start/topics/recipes/mediawiki/

Issue History

Date Modified Username Field Change
2019-03-26 16:24 marcgold New Issue
2019-03-26 16:24 marcgold Status new => assigned
2019-03-26 16:24 marcgold Assigned To => Mazi
2019-03-26 16:25 Mazi Status assigned => new
2019-03-26 16:25 Mazi Assigned To Mazi =>
2019-03-26 18:20 DenisChenu Note Added: 51142
2019-03-29 10:45 cdorin Note Added: 51192
2019-03-29 11:57 DenisChenu Note Added: 51196
2019-03-29 14:52 cdorin Note Added: 51200
2019-03-29 15:36 DenisChenu Note Added: 51201
2019-03-29 15:36 DenisChenu Assigned To => DenisChenu
2019-03-29 15:36 DenisChenu Status new => assigned
2019-03-29 15:54 cdorin Note Added: 51202
2021-01-28 14:43 DenisChenu Note Added: 61733