When I do so. I will get CSRF errors if I try to login.
Can you enable this? Also not sure if your additional ngnix settings are needed at all.
I activated it. The site is servered via https. But all images are injected via http. (force_https = off)
<img src="http://discourse.example.com/uploads/default/original/1X/593cede4e8e56440200ac607555ba8f17f8a05e3.png" alt="IRON ESports" id="site-logo" class="logo-big">
I was able to activate HTTPS in Discourse. I even don’t get the csrf token error any more if I try to login. Thank you @fhe @pfaffman
For future Googlers:
Additional nginx directives
location ~ / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://localhost:8060;
}
Security
Discourse Settings
force https
<-- On
app.yml
No changes regarding SSL.
Template Section
## Uncomment these two lines if you wish to add Lets Encrypt (https)
#- "templates/web.ssl.template.yml"
#- "templates/web.letsencrypt.ssl.template.yml"
#- "templates/web.socketed.template.yml"
Expose Section
expose:
- "8060:80" # http
- "9443:443" # https
Hi guys.
When I try to build a discourse on Plesk vps, I get the following error.
Do you help to solve the problem?
4297 files changed, 53731 insertions(+), 39845 deletions(-)
create mode 100644 app/assets/javascripts/discourse-common/helpers/popular-themes.js.es6
create mode 100644 app/assets/javascripts/discourse-common/mixins/focus-event.js.es6
rename app/assets/javascripts/discourse/components/concerns/{category_search_priorities.js.es6.erb => category-search-priorities.js.es6.erb} (100%)
create mode 100644 app/assets/javascripts/discourse/components/reviewable-claimed-topic.js.es6
delete mode 100644 app/assets/javascripts/discourse/helpers/format-score.js.es6
delete mode 100644 app/assets/javascripts/discourse/initializers/focus-event.js.es6
delete mode 100644 app/assets/javascripts/discourse/initializers/ios-input-no-zoom.js.es6
create mode 100644 app/assets/javascripts/discourse/lib/throttle.js.es6
create mode 100644 app/assets/javascripts/discourse/templates/components/reviewable-claimed-topic.hbs
create mode 100644 app/assets/javascripts/discourse/templates/components/reviewable-field.hbs
create mode 100644 app/assets/javascripts/discourse/templates/components/reviewable-post-header.hbs
create mode 100644 app/assets/javascripts/discourse/widgets/concerns/notification-types.js.es6.erb
create mode 100644 app/assets/javascripts/locales/en_US.js.erb
delete mode 100644 app/assets/javascripts/pretty-text/engines/discourse-markdown/image-protocol.js.es6
create mode 100644 app/assets/javascripts/pretty-text/engines/discourse-markdown/upload-protocol.js.es6
delete mode 100644 app/assets/javascripts/pretty-text/image-short-url.js.es6
create mode 100644 app/assets/javascripts/pretty-text/upload-short-url.js.es6
create mode 100644 app/assets/javascripts/wizard/components/popular-themes.js.es6
create mode 100644 app/assets/javascripts/wizard/templates/components/popular-themes.hbs
create mode 100644 app/controllers/reviewable_claimed_topics_controller.rb
create mode 100644 app/jobs/onceoff/clean_up_user_export_topics.rb
create mode 100644 app/jobs/regular/notify_post_revision.rb
delete mode 100644 app/jobs/scheduled/calculate_avg_time.rb
create mode 100644 app/jobs/scheduled/reviewable_priorities.rb
create mode 100644 app/jobs/scheduled/update_heat_settings.rb
create mode 100644 app/models/anonymous_user.rb
create mode 100644 app/models/remove_muted_tags_from_latest_site_setting.rb
create mode 100644 app/models/reviewable_claimed_topic.rb
create mode 100644 app/models/reviewable_priority_setting.rb
create mode 100644 app/models/reviewable_sensitivity_setting.rb
delete mode 100644 app/serializers/reviewable_score_bonus_serializer.rb
create mode 100644 app/services/heat_settings_updater.rb
create mode 100644 app/services/inline_uploads.rb
create mode 100644 config/initializers/300-perf.rb
create mode 100644 config/locales/client.en_US.yml
create mode 100644 config/locales/server.en_US.yml
create mode 100644 db/migrate/20190430135846_migrate_english_locale.rb
create mode 100644 db/migrate/20190503180839_remove_like_count_from_post_menu.rb
create mode 100644 db/migrate/20190508135348_rename_site_setting_default_topics.rb
create mode 100644 db/migrate/20190508141327_create_reviewable_claimed_topics.rb
create mode 100644 db/migrate/20190508193900_add_missing_uploads_ignored_index_to_post_custom_fields.rb
create mode 100644 db/migrate/20190513143015_add_theme_id_to_javascript_cache.rb
create mode 100644 db/migrate/20190514055014_add_read_notification_index.rb
create mode 100644 db/migrate/20190522194332_add_priority_to_post_action_types.rb
create mode 100644 db/migrate/20190523093215_add_topic_id_to_user_exports.rb
create mode 100644 db/migrate/20190529002752_add_unique_constraint_to_shadow_accounts.rb
create mode 100644 db/migrate/20190531044744_add_enable_defer_to_user_options.rb
create mode 100644 db/migrate/20190531101648_merge_remove_muted_tags_from_latest_site_settings.rb
create mode 100644 db/migrate/20190603134013_change_theme_field_compiler_version.rb
create mode 100644 db/post_migrate/20190508141824_drop_claimed_by_id.rb
rename lib/{read_only.rb => read_only_header.rb} (90%)
create mode 100644 lib/tasks/groups.rake
create mode 100644 public/images/emoji/apple/auto_rickshaw.png
create mode 100644 public/images/emoji/apple/kite.png
create mode 100644 public/images/emoji/apple/orangutan.png
create mode 100644 public/images/emoji/apple/parachute.png
create mode 100644 public/images/emoji/apple/pinching_hand.png
create mode 100644 public/images/emoji/apple/service_dog.png
create mode 100644 public/images/emoji/apple/yawning_face.png
create mode 100644 public/images/emoji/apple/yo-yo.png
create mode 100644 public/images/emoji/emoji_one/auto_rickshaw.png
create mode 100644 public/images/emoji/emoji_one/kite.png
create mode 100644 public/images/emoji/emoji_one/orangutan.png
create mode 100644 public/images/emoji/emoji_one/parachute.png
create mode 100644 public/images/emoji/emoji_one/pinching_hand.png
create mode 100644 public/images/emoji/emoji_one/service_dog.png
create mode 100644 public/images/emoji/emoji_one/yawning_face.png
create mode 100644 public/images/emoji/emoji_one/yo-yo.png
create mode 100644 public/images/emoji/facebook_messenger/auto_rickshaw.png
create mode 100644 public/images/emoji/facebook_messenger/kite.png
create mode 100644 public/images/emoji/facebook_messenger/orangutan.png
create mode 100644 public/images/emoji/facebook_messenger/parachute.png
create mode 100644 public/images/emoji/facebook_messenger/pinching_hand.png
create mode 100644 public/images/emoji/facebook_messenger/service_dog.png
create mode 100644 public/images/emoji/facebook_messenger/yawning_face.png
create mode 100644 public/images/emoji/facebook_messenger/yo-yo.png
create mode 100644 public/images/emoji/google/auto_rickshaw.png
create mode 100644 public/images/emoji/google/kite.png
create mode 100644 public/images/emoji/google/orangutan.png
create mode 100644 public/images/emoji/google/parachute.png
create mode 100644 public/images/emoji/google/pinching_hand.png
create mode 100644 public/images/emoji/google/service_dog.png
create mode 100644 public/images/emoji/google/yawning_face.png
create mode 100644 public/images/emoji/google/yo-yo.png
create mode 100644 public/images/emoji/google_classic/auto_rickshaw.png
create mode 100644 public/images/emoji/google_classic/kite.png
create mode 100644 public/images/emoji/google_classic/orangutan.png
create mode 100644 public/images/emoji/google_classic/parachute.png
create mode 100644 public/images/emoji/google_classic/pinching_hand.png
create mode 100644 public/images/emoji/google_classic/service_dog.png
create mode 100644 public/images/emoji/google_classic/yawning_face.png
create mode 100644 public/images/emoji/google_classic/yo-yo.png
create mode 100644 public/images/emoji/twitter/auto_rickshaw.png
create mode 100644 public/images/emoji/twitter/kite.png
create mode 100644 public/images/emoji/twitter/orangutan.png
create mode 100644 public/images/emoji/twitter/parachute.png
create mode 100644 public/images/emoji/twitter/pinching_hand.png
create mode 100644 public/images/emoji/twitter/service_dog.png
create mode 100644 public/images/emoji/twitter/yawning_face.png
create mode 100644 public/images/emoji/twitter/yo-yo.png
create mode 100644 public/images/emoji/win10/auto_rickshaw.png
create mode 100644 public/images/emoji/win10/kite.png
create mode 100644 public/images/emoji/win10/orangutan.png
create mode 100644 public/images/emoji/win10/parachute.png
create mode 100644 public/images/emoji/win10/pinching_hand.png
create mode 100644 public/images/emoji/win10/service_dog.png
create mode 100644 public/images/emoji/win10/yawning_face.png
create mode 100644 public/images/emoji/win10/yo-yo.png
create mode 100644 public/images/wizard/further-reading.png
create mode 100644 script/analyze_sidekiq_queues.rb
create mode 100644 script/import_scripts/answerhub.rb
mode change 100644 => 100755 script/import_scripts/xenforo.rb
delete mode 100755 script/osx_dev
create mode 100644 spec/fabricators/reviewable_claimed_topic_fabricator.rb
delete mode 100644 spec/fixtures/csv/bulk_invite.csv
create mode 100644 spec/fixtures/emails/reply_and_forwarded.eml
create mode 100644 spec/integrity/coding_style_spec.rb
create mode 100644 spec/jobs/clean_up_user_export_topics_spec.rb
create mode 100644 spec/jobs/reviewable_priorities_spec.rb
rename spec/{components => lib/i18n}/discourse_i18n_spec.rb (78%)
rename spec/{components => lib/i18n}/fallback_locale_list_spec.rb (80%)
rename spec/{services => lib/i18n}/i18n_interpolation_keys_finder_spec.rb (100%)
create mode 100644 spec/lib/search_spec.rb
create mode 100644 spec/models/reviewable_claimed_topic_spec.rb
create mode 100644 spec/requests/reviewable_claimed_topics_controller_spec.rb
create mode 100644 spec/services/heat_settings_updater_spec.rb
create mode 100644 spec/services/inline_uploads_spec.rb
create mode 100644 test/javascripts/acceptance/admin-user-badges-test.js.es6
create mode 100644 test/javascripts/acceptance/click-track-test.js.es6
create mode 100644 test/javascripts/acceptance/composer-attachment-test.js.es6
rename test/javascripts/helpers/{d-editor-helper.js => d-editor-helper.js.es6} (57%)
create mode 100644 test/javascripts/helpers/textarea-selection-helper.js.es6
delete mode 100644 test/javascripts/lib/image-short-url-test.js.es6
create mode 100644 test/javascripts/lib/upload-short-url-test.js.es6
I, [2019-06-05T23:18:27.130921 #14] INFO -- : > cd /var/www/discourse && git fetch origin tests-passed
From https://github.com/discourse/discourse
* branch tests-passed -> FETCH_HEAD
I, [2019-06-05T23:18:28.081975 #14] INFO -- :
I, [2019-06-05T23:18:28.082299 #14] INFO -- : > cd /var/www/discourse && git checkout tests-passed
Switched to a new branch 'tests-passed'
I, [2019-06-05T23:18:28.400605 #14] INFO -- : Branch tests-passed set up to track remote branch tests-passed from origin.
I, [2019-06-05T23:18:28.400779 #14] INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2019-06-05T23:18:28.403969 #14] INFO -- :
I, [2019-06-05T23:18:28.404116 #14] INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2019-06-05T23:18:28.406802 #14] INFO -- :
I, [2019-06-05T23:18:28.407222 #14] INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2019-06-05T23:18:28.441805 #14] INFO -- :
I, [2019-06-05T23:18:28.442232 #14] INFO -- : > cd /var/www/discourse && mkdir -p /shared/log/rails
I, [2019-06-05T23:18:28.445680 #14] INFO -- :
I, [2019-06-05T23:18:28.446014 #14] INFO -- : > cd /var/www/discourse && bash -c "touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
I, [2019-06-05T23:18:28.449367 #14] INFO -- :
I, [2019-06-05T23:18:28.449674 #14] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log /var/www/discourse/log"
I, [2019-06-05T23:18:28.452766 #14] INFO -- :
I, [2019-06-05T23:18:28.453258 #14] INFO -- : > cd /var/www/discourse && bash -c "mkdir -p /shared/{uploads,backups}"
I, [2019-06-05T23:18:28.457917 #14] INFO -- :
I, [2019-06-05T23:18:28.458399 #14] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/{uploads,backups} /var/www/discourse/public"
I, [2019-06-05T23:18:28.464041 #14] INFO -- :
I, [2019-06-05T23:18:28.464667 #14] INFO -- : > cd /var/www/discourse && bash -c "mkdir -p /shared/tmp/{backups,restores}"
I, [2019-06-05T23:18:28.469674 #14] INFO -- :
I, [2019-06-05T23:18:28.470010 #14] INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2019-06-05T23:18:28.476088 #14] INFO -- :
I, [2019-06-05T23:18:28.476909 #14] INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2019-06-05T23:18:28.514450 #14] INFO -- :
I, [2019-06-05T23:18:28.515031 #14] INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2019-06-05T23:18:28.515379 #14] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2019-06-05T23:18:30.382974 #14] INFO -- :
I, [2019-06-05T23:18:30.383323 #14] INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2019-06-05T23:18:30.396249 #14] INFO -- :
I, [2019-06-05T23:18:30.396602 #14] INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2019-06-05T23:18:30.398561 #14] INFO -- :
I, [2019-06-05T23:18:30.398939 #14] INFO -- : > mkdir -p /var/nginx/cache
I, [2019-06-05T23:18:30.400863 #14] INFO -- :
I, [2019-06-05T23:18:30.413396 #14] INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2019-06-05T23:18:30.413986 #14] INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2019-06-05T23:18:30.414355 #14] INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2019-06-05T23:18:30.414758 #14] INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2019-06-05T23:18:30.415063 #14] INFO -- : > echo "done configuring web"
I, [2019-06-05T23:18:30.416997 #14] INFO -- : done configuring web
I, [2019-06-05T23:18:30.417552 #14] INFO -- : > cd /var/www/discourse && gem update bundler
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::EADDRNOTAVAIL: Failed to open TCP connection to rubygems.org:443 (Cannot assign requested address - connect(2) for "rubygems.org" port 443) (https://rubygems.org/specs.4.8.gz)
184:signal-handler (1559776712) Received SIGTERM scheduling shutdown...
I, [2019-06-05T23:18:32.385520 #14] INFO -- :
I, [2019-06-05T23:18:32.385737 #14] INFO -- : Terminating async processes
I, [2019-06-05T23:18:32.385775 #14] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 68
I, [2019-06-05T23:18:32.385815 #14] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 184
2019-06-05 23:18:32.385 UTC [68] LOG: received fast shutdown request
2019-06-05 23:18:32.394 UTC [68] LOG: aborting any active transactions
2019-06-05 23:18:32.395 UTC [68] LOG: worker process: logical replication launcher (PID 77) exited with exit code 1
2019-06-05 23:18:32.397 UTC [72] LOG: shutting down
2019-06-05 23:18:32.415 UTC [68] LOG: database system is shut down
184:M 05 Jun 2019 23:18:32.454 # User requested shutdown...
184:M 05 Jun 2019 23:18:32.454 * Saving the final RDB snapshot before exiting.
184:M 05 Jun 2019 23:18:32.455 * DB saved on disk
184:M 05 Jun 2019 23:18:32.455 # Redis is now ready to exit, bye bye...
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && gem update bundler failed with return #<Process::Status: pid 302 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "find $home ! -user discourse -exec chown discourse {} \\+"]}
cca10b58d66698276448ca68e9dfe230890168db685689683df3c5cb47cad5a3
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
That error says that your server can’t reach https://rubygems.org - either you have a network issue or rubygems was having issues at the time.
Hello,
thank for tutorial but I cant edit port on Plesk…also I would like to know you install discourse base? After discourse/base what step you do?
Hello guys,
excellent guide, everything worked the first time.
I only have one question … for backup?
I noticed in the settings that you can do it on S3.
In case of disaster and installation from 0 it is possible to restore the entire instance from the old backup?
Thanks.