You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* documenting the tab-complete functions
* adding functionality for gunicorn ssl and for specifying one's own ad_location (instead of using the psiturk location)
* printing the ad url and the mturk url, for both psiturk and non-psiturk ad_locations
* no need to ask them twice if they're using an external server...
* functionizes generate_hit_config and also create_psiturk_ad to make hit_create less bulky
* Adding some documentation for the new [server parameter] and
[shell parameter] SSL- and ad-server-related experimental features.
Also I'm removing most of the inline documentation from the default local
config.txt file. It seemed like it might have been overwhelming to
newcomers. I moved it into the docs instead.
* added important note to docs emphasizing that if the psiturk server is ssl-enabled, a proxy server must be used in front of it in order to serve static content.
* warn before reloading on submit page if it hasn't finished submitting to mturk yet.
Copy file name to clipboardExpand all lines: doc/config/server_parameters.rst
+55-10Lines changed: 55 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,18 @@ command line. An example looks like this:
7
7
8
8
::
9
9
10
-
[Server Parameters]
11
-
host = 0.0.0.0
12
-
port = 22362
13
-
cutoff_time = 30
14
-
logfile = server.log
15
-
loglevel = 2
16
-
debug = true
17
-
login_username = examplename
18
-
login_pw = examplepassword
19
-
threads = auto
10
+
[Server Parameters]
11
+
host = 0.0.0.0
12
+
port = 22362
13
+
cutoff_time = 30
14
+
logfile = server.log
15
+
loglevel = 2
16
+
debug = true
17
+
login_username = examplename
18
+
login_pw = examplepassword
19
+
threads = auto
20
+
#certfile = <path_to.crt>
21
+
#keyfile = <path_to.key>
20
22
21
23
`host` [ string]
22
24
--------------
@@ -91,3 +93,46 @@ the the psiturk webserver will run. This enables multiple
91
93
simultanous connections from internet users. If you select
92
94
`auto` it will set this based on the number of processor
93
95
cores on your current computer.
96
+
97
+
`certfile` [ string ]
98
+
----------------------
99
+
.. warning::
100
+
101
+
SSL support for the psiturk server is an experimental feature.
102
+
103
+
`certfile` should be the /path/to/your/domain/SSL.crt
104
+
105
+
If both certfile and keyfile are set and the files readable, then
106
+
the psiturk gunicorn server will run with ssl. You will need
107
+
to execute the psiturk with privileges sufficient to read
108
+
the keyfile (typically root). If you run `psiturk` with `sudo` and if you are using
109
+
a virtual environment, make sure to execute the full path to the desired psiturk instance in your environment.
110
+
See `launch-sudo-psiturk in this gist`_ for an example.
111
+
112
+
If you want to do this, you are responsible for obtaining
113
+
your own cert and key. It is not necessary to run the
114
+
psiturk server with `ssl` in order to use your own ad server.
115
+
You can have a proxy server such as `nginx` in front of
116
+
psiturk/gunicorn which handles ssl connections. See `this gist`_ for an example. **However, if you configure the psiturk server to run with SSL by setting the `certfile` and `keyfile` here, you must use a proxy server in front of psiturk to serve the content in your /static folder. An SSL-enabled psiturk/gunicorn server will not serve static content -- it will only serve dynamic content.**
117
+
118
+
See http://docs.gunicorn.org/en/stable/deploy.html for more information on setting up proxy servers with the psiturk (gunicorn) server.
How to use your own ad_location. Does not require that the **psiTurk** server be SSL-enabled. (Although you will still need your own SSL certificate and key)
124
+
125
+
`keyfile` [ string ]
126
+
----------------------
127
+
.. warning::
128
+
129
+
SSL support for the psiturk server is an experimental feature.
130
+
131
+
`certfile` should be the /path/to/your/domain/private-SSL.key. Although .crts can contain .key files within them,
132
+
psiturk currently requires that you point to separate .crt and .key files for this experimental feature to work.
133
+
134
+
See the documentation for `certfile` for more information.
Copy file name to clipboardExpand all lines: psiturk/default_configs/local_config_defaults.txt
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ login_username = examplename
26
26
login_pw = examplepassword
27
27
threads = auto
28
28
secret_key = 'this is my secret key which is hard to guess, i should change this'
29
+
#certfile = <path_to.crt>
30
+
#keyfile = <path_to.key>
29
31
30
32
[Task Parameters]
31
33
experiment_code_version = 1.0
@@ -34,3 +36,10 @@ num_counters = 1
34
36
35
37
[Shell Parameters]
36
38
launch_in_sandbox_mode = true
39
+
40
+
# If you are not using the psiturk ad server, set `use_psiturk_ad_server` to `false` and point `ad_location` to your proxy server <host> and <port>. Format the ad_location like this:
0 commit comments